Fabiana Ramos

Joined

10 Experience
0 Lessons Completed
0 Questions Solved

Activity

Instead use update_without_password(params) I used update method, and in the line where I was validating password format I added a lambda to verify if password was nil:
validates :password, format: { with: PASSWORD_FORMAT }, on: [:create, :update], :unless => lambda {|u| u.password.nil? }

So, I created a new route to update password, and as I validate password length on devise config, everything is working well (password can not be nil on update_password).