ryanb/cancan — Issue #515: No new record attributes initialization when using CANCAN with inherit_resources
Author: libin0120
Created: 2011-11-17 02:22:27+00:00
State: open

CanCan has this nice feature to initialize attributes according to current user's capability. It will make sure the 'new' action pass the authorization with proper attributes assigned.

But, this feature is skipped when using inherit_resource, cause CanCan let inherit_resource loading the resource, which does not have this initialization feature.

I made a monkey patch to have it work, not sure if this is proper solution to be included into the base code. Hope it could be.

https://gist.github.com/1372180

BTW, CanCan is great!