diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index 7478114..5cab1af 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -195,6 +195,10 @@ class NewsController < ApplicationController links = news.news_bulletin_links.collect{|link| { "link_url" => link.url, "link_title" => (link.title.blank? ? link.url : link.title) } } rescue [] update_user = news.update_user.member_profile.name rescue "" department = news.department rescue "" + + request = OrbitHelper.request + meta_desc = news.subtitle.nil? || news.subtitle == "" ? news.text[0..200] : news.subtitle + OrbitHelper.render_meta_tags([{"property" => "og:title", "content" => news.title},{"property" => "og:site_name", "content" => Site.first.title},{"property" => "og:url", "content" => request.original_url},{"property" => "og:description", "content" => meta_desc},{"property" => "og:image", "content" => "#{request.base_url}#{news.image.url}"},{"property" => "og:type", "content" => "Article"}]) { "tags" => tags, "news_bulletin_files" => files,