devise

https://github.com/plataformatec/devise

Ruby

Flexible authentication solution for Rails with Warden.

Devise::Models::DatabaseAuthenticatable#update_without_password

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

Source | Google | Stack overflow

Edit

git clone [email protected]:plataformatec/devise.git

cd devise

open lib/devise/models/database_authenticatable.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Devise--Models--DatabaseAuthenticatable-update_without_password-for-pr


# Commit to git

git add lib/devise/models/database_authenticatable.rbgit commit -m "better docs for Devise::Models::DatabaseAuthenticatable#update_without_password"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Devise--Models--DatabaseAuthenticatable-update_without_password-for-pr

hub pull-request


# Celebrate!