fix: sort tags in dropdowns by something resembling a sane order

This commit is contained in:
Neetpone 2024-04-02 20:09:24 -04:00
parent c54156c050
commit e02293d60d

View file

@ -62,8 +62,8 @@ class SearchController < ApplicationController
private
def load_tags
@character_tags = Tag.where(type: 'character').pluck(:name)
@other_tags = Tag.where.not(type: 'character').pluck(:name)
@character_tags = Tag.where(type: 'character').order(name: :asc).pluck(:name)
@other_tags = Tag.where.not(type: 'character').order(name: :asc).pluck(:name)
end
# returns: [included tags, excluded tags]