-
-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined local variable or method `password' for #<User:0x007f8bb1791cd0> #53
Comments
Does your model include :validatable? If so, override the password_required? method to always return false. |
Hi @larryzhao. I'm having problems with to use this gem logging in a I'm not getting call If you @nbudin know answering my doubts, please, show me. Thanks in advance! Update |
@fabianoalmeida Did you set |
@fabianoalmeida, you'll also want to make sure you are making controllers check authentication in a before_filter. Obviously, this is more on the devise side of the configuration, but it's a possibility for what you're seeing. I usually put mine in the application_controller.rb: before_filter :authenticate_user!, :unless => :devise_controller? |
@nbudin yeah, I did it. 😔 I have a silly question... Using this gem I need create a User table, right? Could I ignore it? I mean... Is this really necessary (create User table on database)? Thanks in advance! |
@fabianoalmeida Yes, you do need a User table, because Devise requires one by design. I can see why you might say it wouldn't be necessary, but for Devise, it is. If you want to avoid having a User table, I suggest looking into using rubycas-client directly rather than using this gem. |
In your User Model add "include Devise::Models::DatabaseAuthenticatable" |
After I logged in successfully against
rubycas-server
, I got this error:And if I add
attr_accessor :password
then everything looks OK. But actually since we are authenticating against the CAS system. It's unnecessary to have thepassword
field.The text was updated successfully, but these errors were encountered: