TagSetPresenter: refactor to pass options explicitly.

Refactor tag_list_html, split_tag_list_html, and inline_tag_list_html to
take the `show_extra_links` and `current_query` options explicitly,
rather than implicitly relying on CurrentUser or taking `params[:tags]`
from the template.
This commit is contained in:
evazion
2018-09-30 11:32:30 -05:00
parent 2cc4e35cc9
commit 99632d5e8a
12 changed files with 36 additions and 44 deletions

View File

@@ -9,7 +9,7 @@
<section id="tag-box">
<h1>Tags</h1>
<%= @post_set.presenter.tag_list_html(self) %>
<%= @post_set.presenter.tag_list_html(current_query: params[:tags], show_extra_links: CurrentUser.user.is_gold?) %>
</section>
<%= render "posts/partials/index/options" %>