explore/posts/popular: refactor post previews.

This commit is contained in:
evazion
2020-01-12 22:57:40 -06:00
parent 74ce866890
commit 12a845de92
7 changed files with 76 additions and 182 deletions

View File

@@ -18,8 +18,7 @@ class StaticController < ApplicationController
def sitemap
@popular_search_service = PopularSearchService.new(Date.yesterday)
@post_set = PostSets::Popular.new(Date.yesterday.to_s, "week", limit: 200)
@posts = @post_set.posts
@posts = Post.where("created_at > ?", 1.week.ago).order(score: :desc).limit(200)
render layout: false
end
end