Merge branch 'ydu' of gitlab.tp.rulingcom.com:root/orbit-announcement into ydu
This commit is contained in:
commit
ca2b66a210
|
@ -16,7 +16,7 @@ class Bulletin
|
|||
# include Tire::Model::Search
|
||||
# include Tire::Model::Callbacks
|
||||
|
||||
is_impressionable :counter_cache => { :column_name => :view_count }
|
||||
is_impressionable
|
||||
|
||||
field :title, localize: true
|
||||
field :subtitle, localize: true
|
||||
|
@ -163,6 +163,10 @@ class Bulletin
|
|||
User.find(self.email_user_ids) rescue []
|
||||
end
|
||||
|
||||
def view_count
|
||||
Impression.where(:impressionable_id=>self.id).count
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
# def clean_values
|
||||
|
|
Loading…
Reference in New Issue