Skip to content

Commit

Permalink
[Search] Apply page limit based on search.gov offset limit (#3593)
Browse files Browse the repository at this point in the history
* [Search] Apply page limit based on search.gov offset limit

* lint

* Fix current_page instead
  • Loading branch information
Nick Sullivan authored Dec 12, 2019
1 parent 6203e7c commit 2439b76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/search/pagination.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def current_page

def pagination_object
{
'current_page' => [current_page, total_pages].min,
'current_page' => [current_page, total_viewable_pages].min,
'per_page' => ENTRIES_PER_PAGE,
'total_pages' => total_viewable_pages,
'total_entries' => total_viewable_entries
Expand Down

0 comments on commit 2439b76

Please sign in to comment.