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

Exclude path_params from page_url_for params keys #1123

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

martinemde
Copy link

@martinemde martinemde commented Apr 4, 2024

It is possible to add path_params=val to the url and cause 500 errors when this code is invoked by kaminari. Exclude it from params to avoid this problem.

I thought about trying to patch this in rails, but I think passing all of @params to url_for is not happening regularly. Let me know if you disagree.

EDIT: It would seem it is not currently possible to control the params that are passed to url_for. Passing params: to paginate only adds to the params instead of replacing them. This means the solution requires altering the global params as in rubygems/rubygems.org#4580.

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

1 participant