Gavin Morrice wrote:
Hey all - just wanted to check if I'm going about this in the right
way...
I have class User, user has a password
Password should only be valid if it's between 6 and 16 chars in
length.
Fist of all, don't limit the length of a user's password. At least not
down to
Don't store the plain text and the hashed password in the same
column. Create the methods for the plain text password in your model
and store the hashed (and salted and stretched I hope) value in the
database. Then fix your validation, since the model should be
checking the password before
Gottit - thank you both for clearing that up
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from
3 matches
Mail list logo