Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

No new record attributes initialization when using CANCAN with inherit_resources #515

Closed
libin0120 opened this issue Nov 17, 2011 · 1 comment

Comments

@libin0120
Copy link

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!

@cmar
Copy link
Collaborator

cmar commented May 15, 2012

Please consider creating a pull request with specs.

http://help.github.com/send-pull-requests/

@cmar cmar closed this as completed May 15, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants