Bug: Limit param is ignored
bug
### 👀 Before submitting...
- [x] I upgraded to pagy version 43.2.10
- [x] I asked [Pagy AI](https://gurubase.io/g/pagy) (Good starting point for further investigation).
- [x] I searched through the [Documentation](https://ddnexus.github.io/pagy/), [Issues](https://github.com/ddnexus/pagy/issues), and [Q&A](https://github.com/ddnexus/pagy/discussions/categories/q-a)
### 🧐 REQUIREMENTS
- [x] I am providing a VALID code file that confirms the bug
- [x] I am NOT posting any of the USELESS THINGS listed above
- [x] I am aware that this issue will be automatically closed if the code file is missing or INVALID
### 💬 Description
I don't have time to write a full POC right now but it is easy to replicate the issue:
Since https://github.com/ddnexus/pagy/compare/43.1.4...43.1.5 (43.1.5) the limit page param is ignored by default.
Before:
@pagy, @resources = pagy(@q.result, limit: params[:limit])
I set the limit to 10 in my URL, you can see it in the paging as URL query for each page ( <%== pagy.series_nav(:bootstrap, link_extra: "data-turbo-action='advance'") %> )
After:
I set the limit to 10, you can no longer see this come back into the page URL query, only the page param is kept.
Since the code change we have to set a "client_max_limit" otherwise the limit is ignored when using paging.
Which is a solution but this feels like a bug since it broke our pagination when upgrading to a newer minor version
0 条评论