added for file sharing

This commit is contained in:
Harry Bomrah 2015-07-03 20:35:28 +08:00
parent 0df3a5f6a6
commit b7d16f0f15
1 changed files with 5 additions and 0 deletions

View File

@ -210,6 +210,11 @@ class AnnouncementsController < ApplicationController
links = announcement.bulletin_links.map{|link| { "link_url" => link.url, "link_title" => (link.title.blank? ? link.url : link.title) } } rescue []
update_user = announcement.update_user.member_profile.name rescue ""
request = OrbitHelper.request
meta_desc = announcement.subtitle.nil? || announcement.subtitle == "" ? announcement.text[0..200] : announcement.subtitle
OrbitHelper.render_meta_tags([{"property" => "og:title", "content" => announcement.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}#{announcement.image.url}"},{"property" => "og:type", "content" => "Article"}])
{
"tags" => ann_tags,
"categories" => categories,