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 arrays inside nested parameters #226

Conversation

neilvcarvalho
Copy link

When one scope is handled by multiple fields, we need to add each of those fields to the permitted params. However, when one of those inner fields includes multiple-select fields, we don't instruct Strong Parameters that those params expect arrays. As a result, those keys are dropped.

This commit fixes that, recursively handling each nested param, so that arrays and other nested fields are supported.

Fixes #225

When one scope is handled by multiple fields, we need to add each of
those fields to the permitted params. However, when one of those inner
fields includes multiple-select fields, we don't instruct Strong
Parameters that those params expect arrays. As a result, those keys are
dropped.

This commit fixes that, recursively handling each nested param, so that
arrays and other nested fields are supported.
@neilvcarvalho neilvcarvalho force-pushed the nc-multiple-fields-multi-select branch from ac15fd6 to d47f5d9 Compare September 4, 2023 12:30
@neilvcarvalho
Copy link
Author

Closing in favor of #213

@neilvcarvalho neilvcarvalho deleted the nc-multiple-fields-multi-select branch September 4, 2023 16:44
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-select and multiple inputs for a single scope don't work together
1 participant