Files
danbooru/app/presenters/post_set_presenters/favorite.rb
2019-08-31 19:58:38 -05:00

13 lines
392 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.frequent_tags_for_posts(post_set.posts).take(25))
end
end
end