CanCan ruby ​​on rails error

I am just starting a new project in Rails, and I wanted to add some CanCan roles to the application. What I did: 1. The proper gem is installed 2. Included in the cancan gemfile 3. Created ability class 4. The check_authorization function has been added to my ApplicationController application

But still I get

undefined local variable or method `authorize_resource 'for ApplicationController: Class

or

undefined local variable or `check_authorization 'method for ApplicationController: Class

error. Has anyone got any ideas what could be the reason?

My cancan version is 1.6.7. Gem Version - 1.9.1

+3
source share
1 answer

@Animattronic, Rails.

+3

All Articles