aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation/query_methods.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/relation/query_methods.rb')
-rw-r--r--activerecord/lib/active_record/relation/query_methods.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb
index 53ff48d82e..e1c74ce90a 100644
--- a/activerecord/lib/active_record/relation/query_methods.rb
+++ b/activerecord/lib/active_record/relation/query_methods.rb
@@ -944,12 +944,11 @@ module ActiveRecord
[@klass.send(:sanitize_sql, other.empty? ? opts : ([opts] + other))]
when Hash
opts = predicate_builder.resolve_column_aliases(opts)
+ opts = @klass.send(:expand_hash_conditions_for_aggregates, opts)
- tmp_opts, bind_values = predicate_builder.create_binds(opts)
+ attributes, bind_values = predicate_builder.create_binds(opts)
self.bind_values += bind_values
- attributes = @klass.send(:expand_hash_conditions_for_aggregates, tmp_opts)
-
predicate_builder.build_from_hash(attributes)
else
[opts]