10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/active_record/acts/muck_inviter.rb', line 10
def acts_as_muck_inviter(options = {})
has_many :invites, :as => :inviter
has_many :invitees, :through => :invites
named_scope :by_newest, :order => "created_at DESC"
named_scope :by_oldest, :order => "created_at ASC"
named_scope :recent, lambda { { :conditions => ['created_at > ?', 1.week.ago] } }
include ActiveRecord::Acts::MuckInviter::InstanceMethods
extend ActiveRecord::Acts::MuckInviter::SingletonMethods
end
|