I have data I am trying to POST that looks like { foo: [[:bar, 1], [:baz, 0]] }
.
How do I permit that using strong parameters? The closest I can get is
params.permit(foo: [[]])
which returns {"foo"=>[]}
Maletor,
it seems to me that the strong parameters can't handle array of array. I did read the code of it in github and it deals with Symbol, String and Hash.
For this case you'll have to handle with your own code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With