From 79f71d35e957772df7454212b3f235423064832a Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Sun, 25 Jan 2015 16:13:27 -0700 Subject: Don't access the where values hash directly in through associations See 4d7a62293e148604045a5f78a9d4312e79e90d13 for the reasoning --- .../lib/active_record/associations/preloader/through_association.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib') 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 -- cgit v1.2.3