diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-10-20 13:18:50 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-10-20 13:18:50 -0700 |
commit | fe67bc2a86f86bdc9c01c4ae54025f46cb7f0f55 (patch) | |
tree | 213e16ca9414eb6f394d5adaa3025806d0937628 /activerecord/lib/active_record/associations/join_dependency/join_association.rb | |
parent | e7bb4bb072b16a715b0a0346b5b127b7c957fae8 (diff) | |
download | rails-fe67bc2a86f86bdc9c01c4ae54025f46cb7f0f55.tar.gz rails-fe67bc2a86f86bdc9c01c4ae54025f46cb7f0f55.tar.bz2 rails-fe67bc2a86f86bdc9c01c4ae54025f46cb7f0f55.zip |
pass in scope chain so reflection is not needed
Diffstat (limited to 'activerecord/lib/active_record/associations/join_dependency/join_association.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/join_dependency/join_association.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/join_dependency/join_association.rb b/activerecord/lib/active_record/associations/join_dependency/join_association.rb index 926d03e495..7420e0df72 100644 --- a/activerecord/lib/active_record/associations/join_dependency/join_association.rb +++ b/activerecord/lib/active_record/associations/join_dependency/join_association.rb @@ -25,11 +25,11 @@ module ActiveRecord super && reflection == other.reflection end - def join_constraints(foreign_table, foreign_klass, join_type, tables, chain) + def join_constraints(foreign_table, foreign_klass, join_type, tables, scope_chain, chain) joins = [] tables = tables.reverse - scope_chain_iter = reflection.scope_chain.reverse_each + scope_chain_iter = scope_chain.reverse_each # The chain starts with the target table, but we want to end with it here (makes # more sense in this context), so we reverse |