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

Allow lists in query strings #50

Merged
merged 1 commit into from
Nov 12, 2022

Conversation

dphaener
Copy link
Contributor

There are use cases where you may want to add an array of values to a query string. I.E. ids[]=1&ids[]=2.

Previously the mergeEntries function was simply replacing any item in the search params with an identical name. This had the effect of only including the final entry in the params.

This updates the mergeEntires function to just do an append rather than a replace if the entry name contains [].

There are use cases where you may want to add an array of values to a
query string. I.E. `ids[]=1&ids[]=2`.

Previously the `mergeEntries` function was simply replacing any item in
the search params with an identical name. This had the effect of only
including the final entry in the params.

This updates the `mergeEntires` function to just do an append rather
than a replace if the entry name contains `[]`.
@marcelolx marcelolx merged commit 54798b3 into rails:main Nov 12, 2022
@marcelolx
Copy link
Collaborator

thanks @dphaener!

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.

2 participants