devise

https://github.com/plataformatec/devise

Ruby

Flexible authentication solution for Rails with Warden.

Devise::Mapping.add_module

Create magic predicates for verifying what module is activated by this map.
Example:

  def confirmable?
    self.modules.include?(:confirmable)
  end

Source | Google | Stack overflow

Edit

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

cd devise

open lib/devise/mapping.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Devise--Mapping-add_module-for-pr


# Commit to git

git add lib/devise/mapping.rbgit commit -m "better docs for Devise::Mapping.add_module"


# 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--Mapping-add_module-for-pr

hub pull-request


# Celebrate!