include a default image in the og:image [ci skip]

This commit is contained in:
Maxwell Salzberg 2012-04-19 20:33:11 -07:00
parent a008aaeba8
commit cdef049529

View file

@ -12,10 +12,8 @@ module OpenGraphHelper
end end
def og_image(post) def og_image(post)
if post.photos.present? img_url = post.photos.present? ? post.photos.first.url(:thumb_medium) : "#{root_url.chop}#{image_path('asterisk.png')}"
img_url = post.photos.first.url(:thumb_medium) meta_tag_with_property('og:image', img_url)
meta_tag_with_property('og:image', img_url)
end
end end
def og_site_name def og_site_name