REFACTOR: compact! works since the array can't contain empty strings

This commit is contained in:
Gerhard Schlager 2018-11-22 13:27:34 +01:00
parent 60941f214c
commit bf27aecce2
1 changed files with 1 additions and 1 deletions

View File

@ -833,7 +833,7 @@ class Search
all_terms = data.scan(/'([^']+)'\:\d+/).flatten
all_terms.map! do |t|
t.split(/[\)\(&']/).find(&:present?)
end.reject!(&:blank?)
end.compact!
query = ActiveRecord::Base.connection.quote(
all_terms