fix og tags for just text

This commit is contained in:
danielgrippi 2012-05-03 16:55:52 -07:00
parent 21fef13620
commit 35b0f7637b

View file

@ -12,8 +12,7 @@ module OpenGraphHelper
end
def og_image(post)
tags = post.photos.map{|x| meta_tag_with_property('og:image', x.url(:thumb_large))}
tags << meta_tag_with_property('og:image', "#{root_url.chop}#{image_path('asterisk.png')}") if tags.empty?
tags = post.photos.map{|x| meta_tag_with_property('og:image', x.url(:thumb_large))} || []
tags.join(' ')
end