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, *)
params.delete(:email)
super(params)
end
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/devise/models/database_authenticatable.rb', line 125 def update_without_password(params, *) if .present? ActiveSupport::Deprecation.warn <<-DEPRECATION.strip_heredoc [Devise] The second argument of `DatabaseAuthenticatable#update_without_password` (`options`) is deprecated and it will be removed in the next major version. It was added to support a feature deprecated in Rails 4, so you can safely remove it from your code. DEPRECATION end params.delete(:password) params.delete(:password_confirmation) result = update(params, *) clean_up_passwords result end |