diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-10-10 16:00:07 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-10-10 16:00:07 -0700 |
commit | 34c3c64eccdb9cbc1b8e254f3d46b1a3c95d2881 (patch) | |
tree | 5b5f63b583cef36c989ffd49059683a23eb8bb0c /activerecord | |
parent | 6537e5044c16de60fe9ccedba9befe0f35b31079 (diff) | |
download | rails-34c3c64eccdb9cbc1b8e254f3d46b1a3c95d2881.tar.gz rails-34c3c64eccdb9cbc1b8e254f3d46b1a3c95d2881.tar.bz2 rails-34c3c64eccdb9cbc1b8e254f3d46b1a3c95d2881.zip |
refactor a little so we can remove some methods
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/associations/join_dependency.rb | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/associations/join_dependency/join_part.rb | 3 |
2 files changed, 1 insertions, 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 |