jhund / filterrific

Filterrific is a Rails Engine plugin that makes it easy to filter, search, and sort your ActiveRecord lists.
http://filterrific.clearcove.ca
MIT License
911 stars 125 forks source link

Allow arrays inside nested parameters #226

Closed neilvcarvalho closed 1 year ago

neilvcarvalho commented 1 year ago

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

neilvcarvalho commented 1 year ago

Closing in favor of #213