How to permit nested parameters in Rails
The context
Rails 5 introduced a big change in how it handles ActionController::Parameters
(the parameters that you get on your Controllers): before Rails 5, if you called your params you would get a hash back and after Rails 5, you get an ActionController::Parameters
object. You can see that by calling params.inspect
and if you call .to_h
on these parameters you should be good to go.