From 3fa61ccb9eed0f17cdef85470ae708b4b09a3c06 Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Wed, 26 Jan 2011 23:00:13 +0000 Subject: Has many through - It is not necessary to manually merge in the conditions hash for the through record, because the creation is done directly on the through association, which will already handle setting the conditions. --- activerecord/test/models/member.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'activerecord/test/models/member.rb') 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 -- cgit v1.2.3