rails/strong_parameters — pull request #121 by simonc (2013-03-26 16:35:16+00:00)
Title: Permitting arrays within a hash

Hi,

After digging the strong_parameters code and trying several filters I can't find a way to permit something like this:

``` ruby
{
modification: {
opening_hours: {
"0" => ["08:00 18:00"],
"1" => ["08:00 18:00"]
}
}
}
```
Is there a specific filter that would allow this ? I tried the following:

``` ruby
params.require(:modification).permit(:opening_hours)
params.require(:modification).permit(opening_hours: [])
params.require(:modification).permit(opening_hours: {})
params.require(:modification).permit(opening_hours: ['0'])
params.require(:modification).permit(opening_hours: { '0' => [] })
```

The only thing I get so far is this:

``` ruby
{
opening_hours: {
"0" => nil,
"1" => nil
}
}
```

Is there a solution here ?
Thanks :)