Fix search feature.
This commit is contained in:
parent
99fa506a51
commit
7306409423
|
@ -202,9 +202,9 @@ class UniversalTablesController < ApplicationController
|
||||||
regex = Regexp.union(regexes.map{|word| Regexp.new(".*"+word+".*", "i")})
|
regex = Regexp.union(regexes.map{|word| Regexp.new(".*"+word+".*", "i")})
|
||||||
end
|
end
|
||||||
if column.type == "text"
|
if column.type == "text"
|
||||||
columns = column.column_entries.any_of(:"text.en" => regex, :"text.zh_tw" => regex)
|
columns = column.column_entries.any_of([{"text.en" => regex}, {"text.zh_tw" => regex}])
|
||||||
elsif column.type == "editor"
|
elsif column.type == "editor"
|
||||||
columns = column.column_entries.any_of(:"content.en" => regex, :"content.zh_tw" => regex)
|
columns = column.column_entries.any_of([{"content.en" => regex}, {"content.zh_tw" => regex}])
|
||||||
end
|
end
|
||||||
# .or(:"content.en" => regex).or(:"content.zh_tw" => regex)
|
# .or(:"content.en" => regex).or(:"content.zh_tw" => regex)
|
||||||
if paginated
|
if paginated
|
||||||
|
|
Loading…
Reference in New Issue