Search code examples
ruby-on-railsdevise

Devise update user without password


I want to update users attributes without password in devise. The case is like, if password and password confirmation fields are not blank then I need devise error and if they are blank then other user attributes need to be updated. How could I do this with devise?

Thanks in advance!


Solution

  • Is this what you're look for? From the Devise wiki

    Allow users to edit their account without providing a password

    It shows how to do it for rails 3 and rails 4

    =======================

    John's solution is a simpler alternative