Seems like one spends more time trying to figure out how to get the
working and then debugging bad code.
If it’s okay though I’ll use this thread since now that I have the
running it’s spitting out an error that I’m not clear on.
First the error:
standon = User.new(:user_name => “standon”)
NameError: uninitialized constant User
const_missing' from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in
Yet here in the model it looks like user is defined:
def self.login(username, password)
user = User.find(:first, :conditions => ['user_name = ?' ,
expected_password = encrypted_password(password,
if user.password_hash != expected_password
user = nil
user #this makes no sense to but