Do full page counts on small index pages.

Normally we skip doing page counts on index pages when there aren't any
search filters. This is on the assumption that most index pages have
more than 1000 pages (20,000 results), so it's not worth counting them
exactly. This isn't always true, so here we turn on full counts on
certain index pages known to be small.
This commit is contained in:
evazion
2019-10-28 15:06:02 -05:00
parent fd4a9d4d30
commit 6424a4de74
14 changed files with 16 additions and 16 deletions

View File

@@ -20,7 +20,7 @@ class UserFeedbacksController < ApplicationController
end
def index
@user_feedbacks = UserFeedback.visible.paginated_search(params)
@user_feedbacks = UserFeedback.visible.paginated_search(params, count_pages: true)
respond_with(@user_feedbacks)
end