Adding will_paginate support for total_entries being passed in as an option #81
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
ApiPagination#paginate takes
options
. These options are then part of paginating the collection using the WillPaginate::Collection#paginate method. Onlypage
andper_page
used to be passed through all the way down to the will_paginate method. This PR makes sure that we simply pass through all options passed in.This specifically adds support for a total_entries size different from the size of the collection.