Module: ActiveRecord::Acts::MuckFeedOwner::ClassMethods

Defined in:
lib/active_record/acts/muck_feed_owner.rb

Instance Method Summary collapse

Instance Method Details

#acts_as_muck_feed_ownerObject

acts_as_muck_feed_owner adds identity feeds to a given object. The feeds attached to the object in this way are then assumed to be produced by the object. For example, if a user writes a blog the blog could be associated with the user in this way.



14
15
16
17
18
19
# File 'lib/active_record/acts/muck_feed_owner.rb', line 14

def acts_as_muck_feed_owner
  has_many :identity_feeds, :as => :ownable
  has_many :own_feeds, :through => :identity_feeds, :source => :feed, :order => 'created_at desc'
  include ActiveRecord::Acts::MuckFeedOwner::InstanceMethods
  extend ActiveRecord::Acts::MuckFeedOwner::SingletonMethods
end