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

camelCase route parameter so multi-word model binding works #670

Merged
merged 9 commits into from
Jun 30, 2023
Merged

camelCase route parameter so multi-word model binding works #670

merged 9 commits into from
Jun 30, 2023

Conversation

Rasmus-Bertell
Copy link
Contributor

Changes multi-word url parameters from snake_case to camelCase so it matches the model name in array. Propably should handle the case changing in some other way, I'll look into it later.

I don't know how to write a test for this, so any help is welcome.

closes #669

@shalvah
Copy link
Contributor

shalvah commented Jun 3, 2023

Sorry, haven't had a chance to try this and decide if it's what we actually want. Will probably not be able to check it out until end of the month, when I'm back from vacation.

@Rasmus-Bertell
Copy link
Contributor Author

Sorry, haven't had a chance to try this and decide if it's what we actually want. Will probably not be able to check it out until end of the month, when I'm back from vacation.

I still need to figure out how to write the test case for this, it would demonstrate the issue better in my opinion.

@shalvah
Copy link
Contributor

shalvah commented Jun 7, 2023

Maybe take a look at the existing tests. I can't recall off the top of my head, but there's a class where we test some different URL parameter matching scenarios.

@shalvah shalvah changed the title fix: multi-word route parameter camelCase camelCase route parameter so multi-word model binding works Jun 30, 2023
@shalvah shalvah merged commit ff59a30 into knuckleswtf:master Jun 30, 2023
6 checks passed
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.

Multi-word names not handled correctly when extracting route key from url param
2 participants