ryanb/cancan — pull request #768 by ekampp (2012-10-26 20:19:43+00:00)
Title: 2.0

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:

def resource_params
unless request.get?
params.require(:user).permit(:email, :name, :password, :password_confirmation)
end
end

If you have any input, please let me know.

Best regards, Emil