Authlogic: getting undefined `password 'method for # <User:

I can't get the User model in Authlogic to understand the "password" method even with the "act_as_authentic" model added. This issue has also been reported on Authlogic beacon, but no one has described how they fixed it:

http://binarylogic.lighthouseapp.com/projects/18752/tickets/128-undefined-method-password-on-rails-231#ticket-128-9

The users table exists with all required fields, and the controllers and everything else definitely follow the writing guide.

Does anyone know what could be wrong?

(Oh, I'm running Rails 2.3.3, Authlogic 2.1.1)

+2


source to share


4 answers


I mistakenly typed "crypted_password" as "crypted_passwond". Arg!



For all those out there, make sure you have all the required columns in your database.

+6


source


Make sure your user model uses acts_as_authentic

:

#app/models/user.rb
class User < ActiveRecord::Base
  acts_as_authentic
end

      



I did all sorts of troubleshooting and somehow removed this when I was looking for another issue.

+4


source


Have you restarted the app after installing authlogic? Using Passenger touch tmp/restart.txt

will be executed.

+2


source


I had the same problem and finally realized that my route for users was wrong. I made my mind

map.resources user

      

when i fixed and changed this authlogic recognized the password field

map.resources.users

      

0


source







All Articles