using rails 3.2.8, I have an application where users can sign in and out, and modify their profile. I am using has_secure_password.
However, there is a requirement for an admin to be able to change some parts of their profile. Obviously, the admin does not know the users password.
How can I save the modified user profile without changing the password ? Only an admin has this functionality.
I eventually solved this. What I ended up doing was to set the password and confirmation to a certain value (a guid) when displaying the form. When saving, the controller removes the fields from the params if they match that guid. The model then only validates (and saves) the password_digest if the fields are present