Allows the controller to overwrite resource_params.
This is done to allow the user to have better control of the allowed parameters that gets parsed to the model resource.
In my case I'm running rails 4, and needed to be able to parse a Actioncontroller::Parameters (strong parameters) hash to the resource, instead of a regular one, in order to parse rails 4's sanitizer.
So my resource_params' method looks something like this:
params.require(:user).permit(:email, :name, :password, :password_confirmation)
If you have any input, please let me know.
Best regards, Emil
Try resource parameters from controller first
This will try to grab the resource parameters from the controller
before grabbing them directly from the params hash. This allows fine
grained control and integration with strong parameters.
Only try the controller's resour parameters if available.
See #763 ;)
Right, I didn't see that other one. Closing this one.