From 397b89c21a3828a428533e5afce41d6eef3dca1e Mon Sep 17 00:00:00 2001 From: Maxwell Salzberg Date: Thu, 19 Apr 2012 21:03:06 -0700 Subject: [PATCH] small improvements to open graph stuff [ci skip] --- app/helpers/open_graph_helper.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/helpers/open_graph_helper.rb b/app/helpers/open_graph_helper.rb index b28d13167..b4ee747f1 100644 --- a/app/helpers/open_graph_helper.rb +++ b/app/helpers/open_graph_helper.rb @@ -12,8 +12,9 @@ module OpenGraphHelper end def og_image(post) - img_url = post.photos.present? ? post.photos.first.url(:thumb_medium) : "#{root_url.chop}#{image_path('asterisk.png')}" - meta_tag_with_property('og:image', img_url) + tags = post.photos.map{|x| meta_tag_with_property('og:image', x.url(:thumb_small))} + tags << meta_tag_with_property('og:image', "#{root_url.chop}#{image_path('asterisk.png')}") if tags.empty? + tags.join(' ') end def og_site_name