You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.
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.
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!
The text was updated successfully, but these errors were encountered: