Skip to content

Instantly share code, notes, and snippets.

@andrew-a-dev
Last active November 15, 2016 14:40
Show Gist options
  • Save andrew-a-dev/b40c92113c1a133a9a2f7a6581d0f344 to your computer and use it in GitHub Desktop.
Save andrew-a-dev/b40c92113c1a133a9a2f7a6581d0f344 to your computer and use it in GitHub Desktop.
> def check_aspect_ratio(hymnal_ad_id)
> a = HymnalAd.find(hymnal_ad_id)
> [Ad.find(a.cdn_identifier).class.desktop_aspect_ratio,
> a.desktop_aspect_ratio]
> end
=> :check_aspect_ratio
> check_aspect_ratio 238
=> [1.6898954703832754, 1.6898954703832754]
> check_aspect_ratio 592
=> [2.7450980392156863, 1.6898954703832754]
> check_aspect_ratio 596
=> [2.7450980392156863, 1.6898954703832754]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment