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.
13 lines
273 B
Ruby
13 lines
273 B
Ruby
class UploadPresenter < Presenter
|
|
attr_reader :upload
|
|
delegate :inline_tag_list_html, to: :tag_set_presenter
|
|
|
|
def initialize(upload)
|
|
@upload = upload
|
|
end
|
|
|
|
def tag_set_presenter
|
|
@tag_set_presenter ||= TagSetPresenter.new(upload.tag_string.split)
|
|
end
|
|
end
|