Purge invalid gentags from tags table (#3390).

Purges gentags with invalid names from the tags table. Addresses #3390
(Searching certain metatags results in an empty paginator) by removing
metatags from the tags table.
This commit is contained in:
evazion
2017-11-20 12:13:28 -06:00
parent 05dea309b2
commit 7034a96048
2 changed files with 24 additions and 0 deletions

View File

@@ -783,6 +783,10 @@ class Tag < ApplicationRecord
end
module SearchMethods
def empty
where("tags.post_count <= 0")
end
def nonempty
where("tags.post_count > 0")
end