tags: refactor tag lists to use ViewComponent.

This commit is contained in:
evazion
2021-01-30 14:01:07 -06:00
parent 9d60046f1d
commit 1f637867a4
25 changed files with 256 additions and 131 deletions

View File

@@ -201,14 +201,6 @@ module PostSets
searches = ["search:all"] + SavedSearch.labels_for(CurrentUser.user.id).map {|x| "search:#{x}"}
searches.take(MAX_SIDEBAR_TAGS)
end
def tag_set_presenter
@tag_set_presenter ||= TagSetPresenter.new(related_tags)
end
def tag_list_html(**options)
tag_set_presenter.tag_list_html(name_only: query.is_metatag?(:search), **options)
end
end
end
end