Allow searching tags by list of comma-delimited names
This commit is contained in:
@@ -563,6 +563,10 @@ class Tag < ActiveRecord::Base
|
|||||||
q = q.name_matches(params[:name_matches].strip.tr(" ", "_"))
|
q = q.name_matches(params[:name_matches].strip.tr(" ", "_"))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if params[:name].present?
|
||||||
|
q = q.where("name in (?)", params[:name].split(","))
|
||||||
|
end
|
||||||
|
|
||||||
if params[:category].present?
|
if params[:category].present?
|
||||||
q = q.where("category = ?", params[:category])
|
q = q.where("category = ?", params[:category])
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user