devise
https://github.com/plataformatec/devise
Ruby
Flexible authentication solution for Rails with Warden.
Devise::Models.config
Creates configuration values for Devise and for the given module.
Devise::Models.config(Devise::DatabaseAuthenticatable, :stretches)
The line above creates:
1) An accessor called Devise.stretches, which value is used by default;
2) Some class methods for your model Model.stretches and Model.stretches=
which have higher priority than Devise.stretches;
3) And an instance method stretches.
To add the class methods you need to have a module ClassMethods defined
inside the given class.Edit
git clone [email protected]:plataformatec/devise.git
cd devise
open lib/devise/models.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Devise--Models-config-for-pr
# Commit to gitgit add lib/devise/models.rbgit commit -m "better docs for Devise::Models.config"
# 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-config-for-pr
hub pull-request
# Celebrate!