autocomplete: fix autocomplete returning empty tags.
Fix regression caused by 57ba5c59. Autocomplete implicitly relied on
Tag.search filtering out nonempty tags by default.
This commit is contained in:
@@ -349,8 +349,11 @@ class Tag < ApplicationRecord
|
||||
|
||||
query1 =
|
||||
Tag
|
||||
.nonempty
|
||||
.select("tags.name, tags.post_count, tags.category, null AS antecedent_name")
|
||||
.search(:name_matches => wildcard_name, :order => "count").limit(limit)
|
||||
.name_matches(wildcard_name)
|
||||
.order(post_count: :desc)
|
||||
.limit(limit)
|
||||
|
||||
query2 =
|
||||
TagAlias
|
||||
|
||||
Reference in New Issue
Block a user