devise

https://github.com/plataformatec/devise

Ruby

Flexible authentication solution for Rails with Warden.

ActionDispatch::Routing::Mapper#unauthenticated

Allow you to route based on whether a scope is *not* authenticated.
You can optionally specify which scope.

  unauthenticated do
    as :user do
      root to: 'devise/registrations#new'
    end
  end

  root to: 'dashboard#show'

Source | Google | Stack overflow

Edit

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

cd devise

open lib/devise/rails/routes.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-ActionDispatch--Routing--Mapper-unauthenticated-for-pr


# Commit to git

git add lib/devise/rails/routes.rbgit commit -m "better docs for ActionDispatch::Routing::Mapper#unauthenticated"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-ActionDispatch--Routing--Mapper-unauthenticated-for-pr

hub pull-request


# Celebrate!