diff options
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/relation/query_methods.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index 09332418d5..58af930446 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -187,15 +187,13 @@ module ActiveRecord def build_where(*args) return if args.blank? - builder = PredicateBuilder.new(table.engine) - opts = args.first case opts when String, Array @klass.send(:sanitize_sql, args.size > 1 ? args : opts) when Hash attributes = @klass.send(:expand_hash_conditions_for_aggregates, opts) - builder.build_from_hash(attributes, table) + PredicateBuilder.new(table.engine).build_from_hash(attributes, table) else opts end |