views:

18

answers:

1

hi..

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...

+1  A: 

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.

Shadwell