I never came across this situation, but here I found a link to the fetch method
http://api.rubyonrails.org/classes/ActionController/Parameters.html#method-i-fetch
Is it possible to write the params.fetch (: engagement) .permit (: opinion) command to the fetch command?
Yes, you can still use
params.fetch(:engagement).permit(:attributes, :you, :want, :to, :allow)
I do not know what to do with curly braces.
This is the default value that will be returned if the key is missing or it throws an error
params.fetch(:engagement)
How to fill in strong parameters with this new expression form?
params.fetch(:engagement).permit(:attributes, :you, :want, :to, :allow)
source share