small medium large xlarge

29 Feb 2008, 17:08
Jeff Sharpe (1 post)

The method shown in the 2nd edition book, to validate users via passwords and storing them in the db securely, is great. I think this use case is perfect if users manage their own data.

Using this method, I added a way for administrators to edit users - or when I want to manipulate the User data via migrations - but unless I (re)set the password and password_confirmation the validations run (and update fails). I remove the validation, resets the password to “” values.

I thought of adding a :if => {something} to the validations - but have not come up with something that works through all use-cases.

Anyone else hit this problem?

You must be logged in to comment