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 -- Posted via http://www.ruby-forum.com/.
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 On 6/9/06, ror directory <rajads133@yahoo.com> wrote:> > 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 > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060609/963c5f3f/attachment.html
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.