add most viewed posts page

This commit is contained in:
r888888888
2017-11-10 16:21:01 -08:00
parent 6c4eb62957
commit 8b1fca4662
8 changed files with 109 additions and 1 deletions

View File

@@ -8,6 +8,12 @@ module Explore
respond_with(@posts)
end
def viewed
@post_set = PostSets::MostViewed.new(params[:date])
@posts = @post_set.posts
respond_with(@posts)
end
def searches
@date = params[:date] ? Date.parse(params[:date]) : Date.today
@search_service = PopularSearchService.new(@date)