CanCanCommunity/cancancan — pull request #29 by svoop (2014-03-21 09:38:57+00:00)
Title: Allow more complex code such as 'permitted_params.user' as param_method.

In his screencast 371, Ryan suggested `PermittedParams` class to centrally host reusable rules for strong parameters. A sanitizer in the context of the controller then looks like `permitted_params.user`.

Unfortunately, this does not work with the current implementation of the param_method option because `respond_to?('permitted_params.user')` is always false. This little commit allows more complex use of param_method.

(Ryan - as the original author of CanCan - inspired quite a few people to follow his PermittedParams class path which will cause headache when such applications are updated to Rails 4.)

Thanks for considering this or another approach which tackles this problem (e.g. with Procs).