search: clean up status: metatag.

* Fix not being able to use the status: metatag twice in the same search.
* Fix status:active excluding banned posts.
* Fix status:garbage returning all posts.
This commit is contained in:
evazion
2020-04-20 03:22:15 -05:00
parent c452aa6c78
commit c92ac9ab89
4 changed files with 47 additions and 41 deletions

View File

@@ -1,7 +1,7 @@
module Searchable
extend ActiveSupport::Concern
def negate(kind = :nor)
def negate(kind = :nand)
unscoped.where(all.where_clause.invert(kind).ast)
end