Permalink
Browse files

subtracting blank strings is slightly faster than blank?

  • Loading branch information...
1 parent ccc89f4 commit 7de03ec765e3160f5331fc17c8d7d332fa679d62 @tenderlove tenderlove committed Aug 11, 2010
Showing with 1 addition and 3 deletions.
  1. +1 −3 activerecord/lib/active_record/relation/query_methods.rb
@@ -135,9 +135,7 @@ def build_arel
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)

0 comments on commit 7de03ec

Please sign in to comment.