Sha256: e06ad281b1fa3d63ede01f4caae7d46a9f35b48deb866a6af0e47e5d934ab163
Contents?: true
Size: 1.08 KB
Versions: 25
Compression:
Stored size: 1.08 KB
Contents
module ActiveRecord module Acts #:nodoc: module MuckFeedOwner # :nodoc: def self.included(base) base.extend(ClassMethods) end module ClassMethods # +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. 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 end # class methods module SingletonMethods end module InstanceMethods # Override this method to define whether or not a user can add feeds. def can_add_feeds? false end end end end end
Version data entries
25 entries across 25 versions & 1 rubygems