Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
subtracting blank strings is slightly faster than blank?
- Loading branch information
1 parent
36cb62e
commit c8509d5
Showing
1 changed file
with
1 addition
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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| | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
tenderlove
Author
Member
|
||
case where | ||
when Arel::SqlLiteral | ||
arel = arel.where(where) | ||
|
not equal change. nil values are skipped. I think it should be @where_values - ['', nil]