search for: activity_feed_item_subscrib

Displaying 1 result from an estimated 1 matches for "activity_feed_item_subscrib".

2009 Sep 27
1
Switchboard - Easy to use global ActiveRecord event listeners
...ed" publish_activity_feed_items record, description end def after_destroy(record) description = "#{record.class.name} was deleted" publish_activity_feed_items record, description end def publish_activity_feed_items(record, description) record.activity_feed_item_subscribers.each do |subscriber| ActivityFeedItem.create :user => subscriber, :description => description end end private :publish_activity_feed_items end end Notice how these classes are almost identical to ActiveRecord::Observer subclasses, designed so that it''s ea...