So i have the following params permitted.
p = params.permit(:a, :b, :c, :lines => [:location_id, :quantity, :product => [:id]])
In my controller action, i add to the lines
param the data i've permitted.
p['lines'] << {"product"=>{"id"=>"123456"}, "quantity"=>"2", "location_id"=>"123456"}
This is how the params looked after they've been changed.
puts params['lines']
#> [<ActionController::Parameters {"product"=>{"id"=>"123456"}, "quantity"=>"2", "location_id"=>"123456"} permitted: false>]
But as you can see it's not permitted. What am i missing here? I am using Rails 5.