Method: Devise::Models::DatabaseAuthenticatable#update_without_password

Defined in:
lib/devise/models/database_authenticatable.rb

#update_without_password(params, *options) ⇒ 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, *options)
  params.delete(:email)
  super(params)
end


96
97
98
99
100
101
102
103
# File 'lib/devise/models/database_authenticatable.rb', line 96

def update_without_password(params, *options)
  params.delete(:password)
  params.delete(:password_confirmation)

  result = update_attributes(params, *options)
  clean_up_passwords
  result
end