search: let wildcard searches match up to 100 tags.

Let searching for things like *_legwear match up to 100 tags. Previously
the limit was 25.
This commit is contained in:
evazion
2021-01-01 19:47:51 -06:00
parent 890c793d9b
commit 36f95891bd
3 changed files with 14 additions and 8 deletions

View File

@@ -249,8 +249,8 @@ class Tag < ApplicationRecord
name_matches(name).or(alias_matches(name))
end
def wildcard_matches(tag, limit: 25)
nonempty.name_matches(tag).order(post_count: :desc, name: :asc).limit(limit).pluck(:name)
def wildcard_matches(tag)
nonempty.name_matches(tag).order(post_count: :desc, name: :asc)
end
def abbreviation_matches(abbrev)