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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user