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


129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# File 'lib/devise/models/database_authenticatable.rb', line 129

def update_without_password(params, *options)
  if options.present?
    Devise.deprecator.warn "      [Devise] The second argument of `DatabaseAuthenticatable#update_without_password`\n      (`options`) is deprecated and it will be removed in the next major version.\n      It was added to support a feature deprecated in Rails 4, so you can safely remove it\n      from your code.\n    DEPRECATION\n  end\n\n  params.delete(:password)\n  params.delete(:password_confirmation)\n\n  result = update(params, *options)\n  clean_up_passwords\n  result\nend\n".strip_heredoc