mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
REFACTOR: compact! works since the array can't contain empty strings
This commit is contained in:
@@ -833,7 +833,7 @@ class Search
|
|||||||
all_terms = data.scan(/'([^']+)'\:\d+/).flatten
|
all_terms = data.scan(/'([^']+)'\:\d+/).flatten
|
||||||
all_terms.map! do |t|
|
all_terms.map! do |t|
|
||||||
t.split(/[\)\(&']/).find(&:present?)
|
t.split(/[\)\(&']/).find(&:present?)
|
||||||
end.reject!(&:blank?)
|
end.compact!
|
||||||
|
|
||||||
query = ActiveRecord::Base.connection.quote(
|
query = ActiveRecord::Base.connection.quote(
|
||||||
all_terms
|
all_terms
|
||||||
|
|||||||
Reference in New Issue
Block a user