User Registration - Password verification


#1

I have a user model with password; when users register, I want users to
enter password twice (to verify) like in any other normal site; how do I
do this?

thanks


#2

You might want to check this link:
http://sonjayatandon.com/05-2006/how-to-build-a-secured-web-application-with-ruby-on-rails/

While it does go beyond just a simple login it covers a password
confirmation field.

Stuart


#3

ror directory wrote the following on 09.06.2006 21:57 :

I have a user model with password; when users register, I want users to
enter password twice (to verify) like in any other normal site; how do I
do this?

thanks

1/ In your model, use

“validates_confirmation_of :password”

2/ In your view, use

“password_field(:model, :password_confirmation)”

for your password confirmation field.