edited routes to redirect to correct pages upon sign up
This commit is contained in:
parent
f8d05dd449
commit
89976ad750
|
@ -2,4 +2,8 @@ class ApplicationController < ActionController::Base
|
||||||
protect_from_forgery with: :exception
|
protect_from_forgery with: :exception
|
||||||
# before_action :authenticate_user!
|
# before_action :authenticate_user!
|
||||||
protect_from_forgery unless: -> { request.format.json? } # Only accept json
|
protect_from_forgery unless: -> { request.format.json? } # Only accept json
|
||||||
|
|
||||||
|
def after_sign_in_path_for(resource)
|
||||||
|
contacts_path
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,7 +4,15 @@ Rails.application.routes.draw do
|
||||||
devise_scope :user do
|
devise_scope :user do
|
||||||
get '/logout', to: 'devise/sessions#destroy'
|
get '/logout', to: 'devise/sessions#destroy'
|
||||||
end
|
end
|
||||||
root to: 'pages#home'
|
|
||||||
|
authenticated :user do
|
||||||
|
root to: "pages#index"
|
||||||
|
end
|
||||||
|
|
||||||
|
unauthenticated :user do
|
||||||
|
root to: "pages#home"
|
||||||
|
end
|
||||||
|
|
||||||
get '/contacts', to: 'pages#index'
|
get '/contacts', to: 'pages#index'
|
||||||
post '/sessions', to: 'video_sessions#create'
|
post '/sessions', to: 'video_sessions#create'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue