devise
https://github.com/plataformatec/devise
Ruby
Flexible authentication solution for Rails with Warden.
Devise::Models::DatabaseAuthenticatable#update_with_password
Update record attributes when :current_password matches, otherwise returns error on :current_password. This method also rejects the password field if it is blank (allowing users to change relevant information like the e-mail without changing their password). In case the password field is rejected, the confirmation is also rejected as long as it is also blank.
Edit
git clone [email protected]:plataformatec/devise.git
cd devise
open lib/devise/models/database_authenticatable.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Devise--Models--DatabaseAuthenticatable-update_with_password-for-pr
# Commit to gitgit add lib/devise/models/database_authenticatable.rbgit commit -m "better docs for Devise::Models::DatabaseAuthenticatable#update_with_password"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Devise--Models--DatabaseAuthenticatable-update_with_password-for-pr
hub pull-request
# Celebrate!