I''ve implemented Rails Recipe #31, Authentication, and I found that validating password and password_confirmation just doesn’t work while the method ‘password=(pass)’ is in the mix, but I need that for the salt/hashing, no? If I don’t use validations, the password gets hashed, salted and stored in the database fine. I can login with same username/password. However, if I want to validate user input (who wouldn’t?) I get told that ''password can’t be blank, password doesn’t match password_confirmation,'' even though in the dump, it clearly shows both password and password_confirmation as having the same word. I thought it may have something to do with the fact that both password & password_confirmation don''t actually exist in the database or that I''m using edge rails, but If I remove the method ‘password=(pass)’, then the validations work perfectly, telling me only when the fields are indeed blank or don''t match, but then of course I get no password_salt or password_hash stored in the database!! Anyone have a different way to generate salt/password_hash other than the ''password=(pass)'' method? I installed acts_as_authenticated as well, and that uses a :if => :password_required? call after each password validation line... a method that seems to simply ignore validating the password fields all together. (could be wrong on that) My Validations: ‘attr_accessor :password’ to my user.rb file ‘validates_presence_of :password, password_confirmation’ ‘validates_confirmation_of :password’ How can I get salt/hash AND validate input for password / password_confirmation?? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---