Fix #1898: Include alias predicates in non-empty Tags search.
Make searches on the /tags index includes aliases too. Show matching aliases like this: Name: gray* ? 75098 grey_hair <- gray_hair ? 35345 grey_eyes <- gray_eyes
This commit is contained in:
@@ -31,6 +31,11 @@ module Danbooru
|
||||
def falsy?
|
||||
self.match?(/\A(false|f|no|n|off|0)\z/i)
|
||||
end
|
||||
|
||||
def ilike?(pattern)
|
||||
pattern = Regexp.escape(pattern).gsub(/\\\*/, ".*")
|
||||
match?(/\A#{pattern}\z/i)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user