-
Notifications
You must be signed in to change notification settings - Fork 30
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
Adds support for pagy #23
Conversation
@kurenn a couple of things:
|
|
Yup! I received explicit requests for that feature in Pagy, and it is available for WillPaginate and Kaminari too. Here is the code that handle that in Pagy: def pagy_url_for(page, pagy)
p_vars = pagy.vars; params = request.GET.merge(p_vars[:page_param] => page, **p_vars[:params])
"#{request.path}?#{Rack::Utils.build_nested_query(pagy_get_params(params))}#{p_vars[:anchor]}"
end |
@cseelus can add more details about the use cases... |
From a (resolved) Pagy issue: The ability to add arbitrary params similar to will_paginates :params option or Kaminaris option with the same name would be helpful for a number of use cases:
|
@kurenn Pagy support does work nicely btw, tested it locally with a production Rails app + Postman as well as an iOS app that consumes the apps API. Thanks so far! |
I think this PR is ready to merge, I updated the README, I'm creating a new issue regarding the |
Any update on this ? Will this be merged ? |
It is done @csaurav ! 🎉 sorry for the delay! the version is |
What does this PR do?