I know that the RoR can do the validation in the models. But I want to confirm the user’s password in the views. I means, it show two textfield for user to type password twice to ensure the user type the password correct, but in the database I only store one value. How can I handle it in the RoR?
Share
In your model do:
In your view do:
This is using the built in rails confirmation validation. It’s will add the virtual accessor for you.