Created
October 16, 2018 05:02
-
-
Save rahuldstiwari/8f6ddff43486c123aac5ecd3089e1a1d to your computer and use it in GitHub Desktop.
Devise authenticated routes in rails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resources :users | |
devise_for :users, controllers: { sessions: 'users/sessions',registrations: 'users/registrations' ,passwords: 'users/passwords' } | |
devise_scope :user do | |
unauthenticated :user do | |
root :to => "users/sessions#new" | |
end | |
authenticated :user do | |
root :to => 'dashboard#index', as: :authenticated_path | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment