Updated ReportFilter to use like query for filtering comments

• Updated:
- ReportFilter to use like query for filtering comments
This commit is contained in:
mgabdev 2021-01-15 15:10:47 -05:00
parent a703b5cb78
commit a5caa5e352

View File

@ -24,7 +24,7 @@ class ReportFilter
when :target_account_id when :target_account_id
Report.where(target_account_id: value) Report.where(target_account_id: value)
when :comment when :comment
Report.where(comment: value) Report.where("LOWER(comment) LIKE LOWER(?)", "%#{value}%")
else else
raise "Unknown filter: #{key}" raise "Unknown filter: #{key}"
end end