From ea37a5709b526c5e58ef5b96a27c62cf222a52c4 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Tue, 25 Jul 2017 18:55:03 +0900 Subject: Remove useless `JoinInformation` Since 213796f removed `binds`, `JoinInformation` only contain `joins`. So it is enough to return `joins` simply. --- activerecord/lib/active_record/associations/join_dependency.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (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 2c3d5b3429..dc029c08bd 100644 --- a/activerecord/lib/active_record/associations/join_dependency.rb +++ b/activerecord/lib/active_record/associations/join_dependency.rb @@ -174,9 +174,9 @@ module ActiveRecord def make_join_constraints(parent, child, join_type, aliasing = false) tables = aliasing ? table_aliases_for(parent, child) : child.tables - info = make_constraints(parent, child, tables, join_type) + joins = make_constraints(parent, child, tables, join_type) - [info] + child.children.flat_map { |c| make_join_constraints(child, c, join_type, aliasing) } + joins.concat child.children.flat_map { |c| make_join_constraints(child, c, join_type, aliasing) } end def table_aliases_for(parent, node) -- cgit v1.2.3