aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2015-01-25 16:13:27 -0700
committerSean Griffin <sean@thoughtbot.com>2015-01-25 16:13:27 -0700
commit79f71d35e957772df7454212b3f235423064832a (patch)
tree280a1a566504bfce891f35cfc1094354aa2a5b66 /activerecord/lib/active_record/associations
parent4d7a62293e148604045a5f78a9d4312e79e90d13 (diff)
downloadrails-79f71d35e957772df7454212b3f235423064832a.tar.gz
rails-79f71d35e957772df7454212b3f235423064832a.tar.bz2
rails-79f71d35e957772df7454212b3f235423064832a.zip
Don't access the where values hash directly in through associations
See 4d7a62293e148604045a5f78a9d4312e79e90d13 for the reasoning
Diffstat (limited to 'activerecord/lib/active_record/associations')
-rw-r--r--activerecord/lib/active_record/associations/preloader/through_association.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/preloader/through_association.rb b/activerecord/lib/active_record/associations/preloader/through_association.rb
index 12bf3ef138..816a807f55 100644
--- a/activerecord/lib/active_record/associations/preloader/through_association.rb
+++ b/activerecord/lib/active_record/associations/preloader/through_association.rb
@@ -80,7 +80,7 @@ module ActiveRecord
else
unless reflection_scope.where_values.empty?
scope.includes_values = Array(reflection_scope.values[:includes] || options[:source])
- scope.where_values = reflection_scope.values[:where]
+ scope.where_values = reflection_scope.where_values
scope.bind_values = reflection_scope.bind_values
end