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.
17 lines
446 B
Ruby
17 lines
446 B
Ruby
module PostSetPresenters
|
|
class Favorite < Base
|
|
attr_accessor :post_set, :tag_set_presenter
|
|
delegate :favorites, :posts, :to => :post_set
|
|
delegate :tag_list_html, to: :tag_set_presenter
|
|
|
|
def initialize(post_set)
|
|
@post_set = post_set
|
|
@tag_set_presenter = TagSetPresenter.new(
|
|
RelatedTagCalculator.calculate_from_sample_to_array(
|
|
post_set.tag_string
|
|
).map {|x| x[0]}
|
|
)
|
|
end
|
|
end
|
|
end
|