Validate password on change of certain fields in RoR
- by Micke
Hello, I am building a RoR app, a community. With a User model and some fields.
So when a user is updating a certain field, like His/Hers berthday. Then i want to validate that the User typed in the password that is the same in the Database. So I know that it is the right user trying to change the birthday.
So i ask you how i can create shuch a validator.
Allso i would like to be able to specify an array of which fields the user has to validate the password to change.
Ps. I am using RoR3. If it mathers.
Thanks, Micke