Hello!
Try to look at authlogic plugin for user authentication:
http://github.com/binarylogic/authlogic/tree/master
Its really cool!
if password.include?( )
errors.add(:password, Must be filled in)
why??
for saving crypted password in database use before_create callback
class User
Hi
You can solve it like
@user.password = Digest::SHA1.hexdigest(@user.password) if
@user.valid?
Change only the above line .
What happens in your code is empty string also gets digested So
fails validation.
Sijo
--
Posted via http://www.ruby-forum.com/.
Thanks!!
@user.password = Digest::SHA1.hexdigest(@user.password) if
@user.valid?
works perfectly!
thanks a lot!!
On 12 Sep, 09:54, Sijo Kg rails-mailing-l...@andreas-s.net wrote:
Hi
You can solve it like
@user.password = Digest::SHA1.hexdigest(@user.password) if
3 matches
Mail list logo