devise
https://github.com/plataformatec/devise
Ruby
Flexible authentication solution for Rails with Warden.
Devise::Models::Authenticatable#valid_for_authentication?
Check if the current object is valid for authentication. This method and find_for_authentication are the methods used in a Warden::Strategy to check if a model should be signed in or not. However, you should not overwrite this method, you should overwrite active_for_authentication? and inactive_message instead.
Edit
git clone [email protected]:plataformatec/devise.git
cd devise
open lib/devise/models/authenticatable.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Devise--Models--Authenticatable-valid_for_authentication--for-pr
# Commit to gitgit add lib/devise/models/authenticatable.rbgit commit -m "better docs for Devise::Models::Authenticatable#valid_for_authentication?"
# 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--Authenticatable-valid_for_authentication--for-pr
hub pull-request
# Celebrate!