This project is archived and is in readonly mode.
has_many :through with :conditions fails
-
Ryan Bigg
Upon further investigation it appears that changing the conditions line from:
:conditions => { :memberships => { :observer => true }}to
:conditions => ["memberships.observer = ?", true]fixes the problem.
The association.replace() call around line #1322 of associations.rb passes in a hash where it appears it should be passing in an array. The caller chain of this leads me to attributes= on line #2732 of base.rb, which gets the key of "memberships" having the value of {:observer => true }. With the Array conditions hash this never occurs, the only output I see from this method is the "name" key having a value of "Joe Student".
-
John Trupiano
If I'm not mistaken, this is a duplicate of #2998 ( https://rails.lighthouseapp.com/projects/8994/tickets/2998-named_sc... ) for which I've submitted a patch. A +1 there would be helpful.