Validate password on change of certain fields in RoR

Posted by Micke on Stack Overflow See other posts from Stack Overflow or by Micke
Published on 2010-05-21T15:27:14Z Indexed on 2010/05/21 15:30 UTC
Read the original article Hit count: 437

Filed under:
|
|

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

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby