Allow searching tags by list of comma-delimited names

This commit is contained in:
Toks
2013-07-15 19:09:49 -04:00
parent 9bf4f2fae5
commit 799ff52004

View File

@@ -563,6 +563,10 @@ class Tag < ActiveRecord::Base
q = q.name_matches(params[:name_matches].strip.tr(" ", "_"))
end
if params[:name].present?
q = q.where("name in (?)", params[:name].split(","))
end
if params[:category].present?
q = q.where("category = ?", params[:category])
end