Refactor searching text attributes.
* Allow using ApplicationRecord#attribute_matches to search text attributes, and standardize models on using this instead of duplicating code. * Remove restrictions that limited wildcard searches to Builders only in various places.
This commit is contained in:
@@ -58,6 +58,9 @@ class BulkUpdateRequest < ApplicationRecord
|
||||
q = q.where(status: params[:status].split(","))
|
||||
end
|
||||
|
||||
q = q.attribute_matches(:title, params[:title_matches])
|
||||
q = q.attribute_matches(:script, params[:script_matches])
|
||||
|
||||
params[:order] ||= "status_desc"
|
||||
case params[:order]
|
||||
when "id_desc"
|
||||
|
||||
Reference in New Issue
Block a user