diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-03 14:12:06 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-03 14:40:06 -0700 |
commit | 83633b807a3b08aaf5554c0fc793583a064c2472 (patch) | |
tree | 7f9e76582a610c3fed8ab380d9a4a5b99b5551a8 /activerecord/lib/active_record/relation/query_methods.rb | |
parent | 18a7b767e8ad545702c1025fc9cc7a1cc3c64f28 (diff) | |
download | rails-83633b807a3b08aaf5554c0fc793583a064c2472.tar.gz rails-83633b807a3b08aaf5554c0fc793583a064c2472.tar.bz2 rails-83633b807a3b08aaf5554c0fc793583a064c2472.zip |
avoid creating objects when we can
Diffstat (limited to 'activerecord/lib/active_record/relation/query_methods.rb')
-rw-r--r-- | activerecord/lib/active_record/relation/query_methods.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index c8174b5f45..001207514d 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -204,7 +204,7 @@ module ActiveRecord [@klass.send(:sanitize_sql, other.empty? ? opts : ([opts] + other))] when Hash attributes = @klass.send(:expand_hash_conditions_for_aggregates, opts) - PredicateBuilder.new(table.engine).build_from_hash(attributes, table) + PredicateBuilder.build_from_hash(table.engine, attributes, table) else [opts] end |