popular posts: add pagination.

This commit is contained in:
evazion
2020-02-23 17:25:37 -06:00
parent 463b1b734e
commit 01e9020b6a
3 changed files with 4 additions and 2 deletions

View File

@@ -6,7 +6,7 @@ module Explore
@date, @scale, @min_date, @max_date = parse_date(params)
limit = params.fetch(:limit, CurrentUser.user.per_page)
@posts = popular_posts(@min_date, @max_date).paginate(params[:page], limit: limit)
@posts = popular_posts(@min_date, @max_date).paginate(params[:page], limit: limit, search_count: false)
respond_with(@posts)
end
@@ -15,7 +15,7 @@ module Explore
@date, @scale, @min_date, @max_date = parse_date(params)
limit = params.fetch(:limit, CurrentUser.user.per_page)
@posts = curated_posts(@min_date, @max_date).paginate(params[:page], limit: limit)
@posts = curated_posts(@min_date, @max_date).paginate(params[:page], limit: limit, search_count: false)
respond_with(@posts)
end

View File

@@ -11,5 +11,6 @@
<%= render "posts/partials/common/inline_blacklist" %>
<%= post_previews_html(@posts) %>
<%= numbered_paginator(@posts) %>
</div>
</div>

View File

@@ -11,5 +11,6 @@
<%= render "posts/partials/common/inline_blacklist" %>
<%= post_previews_html(@posts) %>
<%= numbered_paginator(@posts) %>
</div>
</div>