Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Handle out-of-range and bogus pagination inputs. #137
Handles bogus pagination inputs.
If you visit your local puppet dashboard at
With this change, an invalid per_page uses the default per_page. A too-large page number will show the last page, and a too-small or invalid page number will show the first page.
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
@sodabrew The last new test depends on new will_paginate behavior that isn't in the 2.3.15 that is vendored in dashboard currently. When per_page is nil, as it will be in that example, the current will_paginate defaults to 30, while the newer will_paginate defaults to WillPaginate.per_page. All the tests pass except that one.