views:

938

answers:

3

Hi there, I can't seem to get my User model in Authlogic to understand the 'password' method even though I added "acts_as_authentic" to the model. This problem was also reported on the Authlogic lighthouse, but no one described how they fixed it:

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

The user table exists with all the required fields, and the controllers and everything else is definitely following the tutorial to the letter.

Anyone know what could be wrong?

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

A: 

Have you restarted your application since you installed authlogic? With Passenger, touch tmp/restart.txt will do.

Garrett
+4  A: 

I misspelled "crypted_password" as "crypted_passwond". Arg!

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

btelles
+2  A: 

Make sure your User model is using acts_as_authentic:

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

I did all kinds of troubleshooting and had somehow removed this when I was troubleshooting a different problem.

Randy Syring
Thanks! I'm new to rails and your answer avoided me a lot of frustation!
ryudice