devise

https://github.com/plataformatec/devise

Ruby

Flexible authentication solution for Rails with Warden.

Devise::Models::Recoverable::ClassMethods#reset_password_by_token

Attempt to find a user by its reset_password_token to reset its
password. If a user is found and token is still valid, reset its password and automatically
try saving the record. If not user is found, returns a new user
containing an error in reset_password_token attribute.
Attributes must contain reset_password_token, password and confirmation

Source | Google | Stack overflow

Edit

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

cd devise

open lib/devise/models/recoverable.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Devise--Models--Recoverable--ClassMethods-reset_password_by_token-for-pr


# Commit to git

git add lib/devise/models/recoverable.rbgit commit -m "better docs for Devise::Models::Recoverable::ClassMethods#reset_password_by_token"


# 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--Recoverable--ClassMethods-reset_password_by_token-for-pr

hub pull-request


# Celebrate!