authorize_resource :class => false does not work #944
Comments
According to the wiki page https://github.com/ryanb/cancan/wiki/Non-RESTful-Controllers, cancan will check permissions on |
That did it! Thanks @graywh! |
Actually @graywh, another clarification if you would indulge me (the wiki page isn't entirely clear). If the controller name is also in the singular format say |
The rails convention is to use the plural form for controller names, regardless of the resource being plural or singular. |
Yes, I understand the rails convention. This is an app that I inherited On Thu, Sep 26, 2013 at 11:59 AM, Will Gray notifications@github.comwrote:
Dahlia Bock | +1718.640.0083 | |
If you have 'BackgroundDeploy'.underscore.split('/').last.singularize.to_sym Or just pass symbol: load_and_authorize_resource class: :background_deploy Or watch what can be passed: cancan/lib/cancan/controller_resource.rb Lines 144 to 151 in 4560928
Not documented at all. |
I have the following configuation:
The only way I got it to work was to specifically call authorize! :index, :jobs, authorize! :trigger :jobs, etc on each action.
The text was updated successfully, but these errors were encountered: