We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suppose I have an action called manage in FoosController and the manage route is defined like this:
manage
FoosController
resources :foos, only: %i[update] do member do post :manage end end
At first, one might think the ability for the manage action can be defined like this:
can :manage, Foo
But the manage action is one of the CanCanCan action aliases, so there is conflict with the naming.
I can set different action name in the route and controller (e.g. post :manage, action: :post_manage) for a solution, so the ability will become:
post :manage, action: :post_manage
can :post_manage, Foo
But I'm wondering is there a workaround to keep the manage action name for Foo in ability without getting name conflict with the manage action alias?
Foo
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Suppose I have an action called
manage
inFoosController
and themanage
route is defined like this:At first, one might think the ability for the
manage
action can be defined like this:But the
manage
action is one of the CanCanCan action aliases, so there is conflict with the naming.I can set different action name in the route and controller (e.g.
post :manage, action: :post_manage
) for a solution, so the ability will become:But I'm wondering is there a workaround to keep the
manage
action name forFoo
in ability without getting name conflict with themanage
action alias?The text was updated successfully, but these errors were encountered: