fix share loading failed

This commit is contained in:
Matthew K. Fu JuYuan committed 2012-09-19 15:09:08 +08:00
1 parent 6fd2dac4d5
commit 8b68387199
3 files changed
+11 -1

No files matched your search

@@ -81,6 +81,10 @@ class Bulletin
integer :view_count
string :bulletin_category_id
end
def share_item
Item.first(conditions:{name: 'announcement'})
end
def proc_check(check,not_pass_info = "")
self.is_checked = true
@@ -16,6 +16,7 @@ class NewsBulletin
#scope :searchable,where(:is_checked=>true,:is_hidden=>false,:is_pending=>false)
is_impressionable :counter_cache => { :column_name => :view_count }
@@ -140,6 +141,9 @@ class NewsBulletin
# def s_text_zh_tw
# Nokogiri::HTML(self.text.zh_tw).text
# end
def share_item
Item.first(conditions:{name: 'news'})
end
def self.widget_datas( category_id = nil )