Method: Devise::Models::DatabaseAuthenticatable#update_without_password
- Defined in:
- lib/devise/models/database_authenticatable.rb
#update_without_password(params) ⇒ Object
Updates record attributes without asking for the current password. Never allows a change to the current password. If you are using this method, you should probably override this method to protect other attributes you would not like to be updated without a password.
Example:
def update_without_password(params)
params.delete(:email)
super(params)
end
120 121 122 123 124 125 126 127 |
# File 'lib/devise/models/database_authenticatable.rb', line 120 def update_without_password(params) params.delete(:password) params.delete(:password_confirmation) result = update(params) clean_up_passwords result end |