diff options
Diffstat (limited to 'activerecord/test/models')
-rw-r--r-- | activerecord/test/models/club.rb | 3 | ||||
-rw-r--r-- | activerecord/test/models/member.rb | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/activerecord/test/models/club.rb b/activerecord/test/models/club.rb index 6e7cdd643a..c432a6ace8 100644 --- a/activerecord/test/models/club.rb +++ b/activerecord/test/models/club.rb @@ -1,4 +1,5 @@ class Club < ActiveRecord::Base + has_one :membership has_many :memberships has_many :members, :through => :memberships has_many :current_memberships @@ -10,4 +11,4 @@ class Club < ActiveRecord::Base def private_method "I'm sorry sir, this is a *private* club, not a *pirate* club" end -end
\ No newline at end of file +end diff --git a/activerecord/test/models/member.rb b/activerecord/test/models/member.rb index 15ad6aedd3..e6e78f9e45 100644 --- a/activerecord/test/models/member.rb +++ b/activerecord/test/models/member.rb @@ -13,4 +13,7 @@ class Member < ActiveRecord::Base has_many :current_memberships has_one :club_through_many, :through => :current_memberships, :source => :club + + has_many :current_memberships, :conditions => { :favourite => true } + has_many :clubs, :through => :current_memberships end |