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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user