Module: ActiveRecord::Acts::MuckRakerComment::InstanceMethods
- Defined in:
- lib/active_record/acts/muck_raker_comment.rb
Instance Method Summary collapse
Instance Method Details
#after_create ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/active_record/acts/muck_raker_comment.rb', line 23 def after_create if self.commentable.is_a?(Entry) # Create a new entry_comment activity. Attach the activity to the entry via self.commentable # Include all users in the discussion ie all users from all comments attached to self.commentable feed_to = [] feed_to << self.user.feed_to self.commentable.comments.each do |c| feed_to << c.user if !c.user.blank? end add_activity(feed_to, self.user, self, 'entry_comment', '', '', nil, self.commentable) end end |