From 34c3c64eccdb9cbc1b8e254f3d46b1a3c95d2881 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 10 Oct 2013 16:00:07 -0700 Subject: refactor a little so we can remove some methods --- activerecord/lib/active_record/associations/join_dependency.rb | 2 +- .../lib/active_record/associations/join_dependency/join_part.rb | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/activerecord/lib/active_record/associations/join_dependency.rb b/activerecord/lib/active_record/associations/join_dependency.rb index b3fec5ae0c..6e08f67286 100644 --- a/activerecord/lib/active_record/associations/join_dependency.rb +++ b/activerecord/lib/active_record/associations/join_dependency.rb @@ -80,7 +80,7 @@ module ActiveRecord end def join_constraints - join_root.flat_map(&:join_constraints) + join_root.children.flat_map { |c| c.flat_map(&:join_constraints) } end def columns diff --git a/activerecord/lib/active_record/associations/join_dependency/join_part.rb b/activerecord/lib/active_record/associations/join_dependency/join_part.rb index 0bd47a3646..fbc6199f87 100644 --- a/activerecord/lib/active_record/associations/join_dependency/join_part.rb +++ b/activerecord/lib/active_record/associations/join_dependency/join_part.rb @@ -29,9 +29,6 @@ module ActiveRecord @children = [] end - def join_constraints; []; end - def join_relation(rel); rel; end - def name reflection.name end -- cgit v1.2.3