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 update 2.1 with the new truncate method to ease upgrade 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 [PATCH] deep_merge does not work on HashWithIndifferentAccess 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 [PATCH] SQL generated by find ignores :include option ( #2998 [PATCH] SQL generated by find ignores :include option ) for which I've submitted a patch. A +1 there would be helpful.
-
Ryan Bigg
- State changed from new to duplicate