Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kaminari 1.0 last_page? behavior fix #78

Merged
merged 2 commits into from
Mar 20, 2017
Merged

Kaminari 1.0 last_page? behavior fix #78

merged 2 commits into from
Mar 20, 2017

Conversation

sandrew
Copy link
Contributor

@sandrew sandrew commented Mar 10, 2017

New kaminari 1.0's last_page? method behavior is changed: now it returns false if current page is bigger then total pages.
This breaks our API: Link header with next and last urls appears even on the empty collection (because current_page is always 1 and total_pages is always 0).

This pull-request adds work-around keeping in mind that WillPaginate does not have #out_of_range? method.

@sandrew
Copy link
Contributor Author

sandrew commented Mar 20, 2017

@davidcelis any idea when you can review this?

@davidcelis
Copy link
Owner

@sandrew Sorry about the wait, I've been out sick for a little while.

@davidcelis davidcelis merged commit dbe1d99 into davidcelis:master Mar 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants