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:
evazion
2020-02-23 00:20:09 -06:00
parent a8e5412d9c
commit a181e6d0db
5 changed files with 26 additions and 1 deletions

View File

@@ -10,6 +10,7 @@ class TagsController < ApplicationController
def index
@tags = Tag.paginated_search(params)
@tags = @tags.includes(:consequent_aliases) if request.format.html?
respond_with(@tags)
end