diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-11 15:31:44 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-11 15:45:06 -0700 |
commit | 7de03ec765e3160f5331fc17c8d7d332fa679d62 (patch) | |
tree | 29e1a0bab0bd5365ea0816d683f01f1ac4173937 /activerecord/lib | |
parent | ccc89f4899b1f251ebc20ad0d6a96c448da69f01 (diff) | |
download | rails-7de03ec765e3160f5331fc17c8d7d332fa679d62.tar.gz rails-7de03ec765e3160f5331fc17c8d7d332fa679d62.tar.bz2 rails-7de03ec765e3160f5331fc17c8d7d332fa679d62.zip |
subtracting blank strings is slightly faster than blank?
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 0ea662f310..cd6c6f8d1f 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -135,9 +135,7 @@ module ActiveRecord arel = build_joins(arel, @joins_values) unless @joins_values.empty? - @where_values.uniq.each do |where| - next if where.blank? - + (@where_values - ['']).uniq.each do |where| case where when Arel::SqlLiteral arel = arel.where(where) |