I use scaffold commands to make my components in my Rails 4 app.
Recently, the terminology used in the method to set the strong params has changed from params.require to params.fetch and now there are curly braces in the setup.
private
# Never trust parameters from the scary internet, only allow the white list through.
def engagement_params
params.fetch(:engagement, {})
end
I can't find any documentation explaining the change or how to use it.
Can I still write params.fetch(:engagement).permit(:opinion) into the fetch command? I don't know what to do with the curly braces.
How do I complete the strong params using this new form of expression?