Skip to content
This repository
Browse code

subtracting blank strings is slightly faster than blank?

  • Loading branch information...
commit 7de03ec765e3160f5331fc17c8d7d332fa679d62 1 parent ccc89f4
Aaron Patterson tenderlove authored
4 activerecord/lib/active_record/relation/query_methods.rb
@@ -135,9 +135,7 @@ def build_arel
135 135
136 136 arel = build_joins(arel, @joins_values) unless @joins_values.empty?
137 137
138   - @where_values.uniq.each do |where|
139   - next if where.blank?
140   -
  138 + (@where_values - ['']).uniq.each do |where|
141 139 case where
142 140 when Arel::SqlLiteral
143 141 arel = arel.where(where)

0 comments on commit 7de03ec

Please sign in to comment.
Something went wrong with that request. Please try again.