aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/join_dependency.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2017-01-30 13:51:48 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2017-01-30 14:03:06 -0800
commite8be3a9016b6c27ead6d5608c3f988c5f72b385b (patch)
tree74a074a8ca91eec76ccf37f39e38edd2855e39f4 /activerecord/lib/active_record/associations/join_dependency.rb
parent4fef7c2a56ee183e720e634bd23d674f46949c1a (diff)
downloadrails-e8be3a9016b6c27ead6d5608c3f988c5f72b385b.tar.gz
rails-e8be3a9016b6c27ead6d5608c3f988c5f72b385b.tar.bz2
rails-e8be3a9016b6c27ead6d5608c3f988c5f72b385b.zip
Fix `scopes` implementation on `PolymorphicReflection`
`PolymorphicReflection` needs to be custom for handling scope lambdas
Diffstat (limited to 'activerecord/lib/active_record/associations/join_dependency.rb')
-rw-r--r--activerecord/lib/active_record/associations/join_dependency.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/join_dependency.rb b/activerecord/lib/active_record/associations/join_dependency.rb
index a79eb03acc..87e0847ec1 100644
--- a/activerecord/lib/active_record/associations/join_dependency.rb
+++ b/activerecord/lib/active_record/associations/join_dependency.rb
@@ -171,7 +171,7 @@ module ActiveRecord
chain = child.reflection.chain
foreign_table = parent.table
foreign_klass = parent.base_klass
- child.join_constraints(foreign_table, foreign_klass, child, join_type, tables, child.reflection.scope_chain, chain)
+ child.join_constraints(foreign_table, foreign_klass, child, join_type, tables, chain)
end
def make_outer_joins(parent, child)