Hi. My head is about to explode on this one.
I am using restful_authentication and added a method to
lib/authentication_system.rb like so:
module AuthenticatedSystem
protected
def logged_in?
current_user != :false
end
def role_at_least(role)
return true
end
…
end
The method “logged_in?” that came with the plugin is always found and
works. But when I call role_at_least() it always returns:
undefined method `role_at_least’ for #<#Class:0x38909f4:0x38909cc>
I have pulled all my hair out and tried just about everything.
Restarted the webrick, tried mongrel, restarted my machine even…
If I remove the logged_in? definition I get the expected "undefined
method `logged_in?’ " message. I then put it back and it works
perfectly, but role_at_least has never been visible. I even tried
removing the parameter to see if it would make any difference but I
similarily get:
undefined local variable or method `role_at_least’ for
#<#Class:0x39efc28:0x39efc00>
I would really appreciate any help or tips on how I can further debug
this.
Thanks, Chad.
