diff options
author | David Genord II <david@xspond.com> | 2010-07-13 18:14:26 -0400 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2010-07-16 08:28:49 +0100 |
commit | 1fcf4e8ecbe4db2443a88d1e06c06667cff5b762 (patch) | |
tree | 8c7a7be386fdcc139142f9e5d7526dcfc4638119 /activerecord/lib | |
parent | 181e0d326de8ce212d951d0e8a8ca0ba478ac5a4 (diff) | |
download | rails-1fcf4e8ecbe4db2443a88d1e06c06667cff5b762.tar.gz rails-1fcf4e8ecbe4db2443a88d1e06c06667cff5b762.tar.bz2 rails-1fcf4e8ecbe4db2443a88d1e06c06667cff5b762.zip |
JoinDependency#graft does not properly set parent join [#5124 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/associations.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index 9fe8d54f02..d67df64f59 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -1761,7 +1761,7 @@ module ActiveRecord def graft(*associations) associations.each do |association| join_associations.detect {|a| association == a} || - build(association.reflection.name, association.find_parent_in(self), association.join_class) + build(association.reflection.name, association.find_parent_in(self) || join_base, association.join_class) end self end |