From 8e1f26c66c5cd1ceb23baca5fb48440a8c9a06c1 Mon Sep 17 00:00:00 2001 From: Washington Luiz Date: Sat, 28 Dec 2013 23:46:21 -0300 Subject: Make outer joins on proper parent Outer joins were being built on the root relation klass rather than the one specified in the join dependency root --- activerecord/lib/active_record/associations/join_dependency.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/associations/join_dependency.rb') diff --git a/activerecord/lib/active_record/associations/join_dependency.rb b/activerecord/lib/active_record/associations/join_dependency.rb index 9506960be3..295dccf34e 100644 --- a/activerecord/lib/active_record/associations/join_dependency.rb +++ b/activerecord/lib/active_record/associations/join_dependency.rb @@ -114,7 +114,7 @@ module ActiveRecord walk join_root, oj.join_root else oj.join_root.children.flat_map { |child| - make_outer_joins join_root, child + make_outer_joins oj.join_root, child } end } -- cgit v1.2.3