I am using CanCan 2.0 gem for authorization and high_voltage gem for static pages.
In my routes.rb file I have:
match 'about' => 'high_voltage/pages#show', id: 'about'
And I want to make it public in my ability.rb file, but none of these two lines do that:
can :read, :pages
can :read, 'high_voltage/pages'
How do I fix this?
Isn't this problem related to the fact that there is no model 'Page'? There is cancan wiki, how to deal with this situation: it should work when you add
authorize_resource :class => false
to your controller.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With