Add pseudo-category search for flags

fixes #1915
This commit is contained in:
Toks
2013-08-04 11:44:17 -04:00
parent 56fa98a358
commit 7c11fd440b
2 changed files with 18 additions and 0 deletions

View File

@@ -49,6 +49,15 @@ class PostFlag < ActiveRecord::Base
q = q.unresolved
end
case params[:category]
when "normal"
q = q.where("reason != ? and reason != ?", "Unapproved in three days", "Artist requested removal")
when "unapproved"
q = q.where("reason = ?", "Unapproved in three days")
when "banned"
q = q.where("reason = ?", "Artist requested removal")
end
q
end
end