using the Rails Recipes book, i went through the tutorial on setting up
authentication on a site. the tutorial was great, but it raises a few
the fields in the database are password_hash, and password_salt. the
tutorial creates another method for password that takes the value it was
given and hashes it and adds the 6 character salt at the end.
what if i want to perform validation on the password that is entered
when a user signs up? first, i want to make sure that the user entered
one in the first place, second, that it is a certain number of
characters. i tried adding validation to the model but i’m guessing it
didn’t work because there isn’t an actual field in the database called
are there any workarounds for something like this? is there a way to use
the validation helpers on things that aren’t in a database?