ruby on rails – current_user method is not accessible – Education Career Blog

i am using declarative_authorization… when i try to access current_user, it gives me the error undefined local variable or method `current_user’… can anyone help me out..?

thnx…

,

current_user is a method that has to be provided for declarative authorization, not something it provides.

From the read me:

Requirement:

An authentication mechanism

  • User object in Controller#current_user
  • (For model security) Setting Authorization.current_user

There is also a section in that read me also about providing the requirements using restful authentication to provide the current_user functionality.

Leave a Comment