explore/posts/viewed: refactor post previews.

This commit is contained in:
evazion
2020-01-12 21:33:31 -06:00
parent 083ce75c10
commit 74ce866890
5 changed files with 4 additions and 76 deletions

View File

@@ -1,17 +0,0 @@
module PostSets
class MostViewed < PostSets::Base
attr_reader :date
def initialize(date)
@date = date.blank? ? Date.today : Date.parse(date)
end
def posts
@posts ||= PostViewCountService.new.popular_posts(date)
end
def presenter
::PostSetPresenters::MostViewed.new(self)
end
end
end