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
url_for skip params which given as defaults #31297
Comments
Can you please provide a sample application that reproduces the error? |
@y-yagi sure, I will do this and add here a link |
@distroid why not use a |
@pixeltrix yes, you right, it's will be work. But i think |
This issue has been automatically marked as stale because it has not been commented on for at least three months. |
Steps to reproduce
I use STI model and one controller with type for initialize different resources:
Routes works as expected for CRUD
For pagination i use
kaminari
. I think problem in helper methodurl_for
he ignored overrided params fromdefaults
and always return url with first initialized route (currently it'spartners
).For example:
It's will be ignored and type skipped.
Expected behavior
For
/partners
in pagination should be/partners?page=<number>
For
/providers
in pagination should be/providers?page=<number>
Actual behavior
For
/partners
in pagination i get/partners?page=<number>
For
/providers
i also get/partners?page=<number>
System configuration
Rails version:
Rails 5.1.4
Ruby version:
ruby 2.3.4p301 (2017-03-30 revision 58214) [x86_64-darwin16]
Related #27132
The text was updated successfully, but these errors were encountered: