Rails.application.routes.draw do

  resources :questions

  root 'questions#index'

  get 'welcome/question', to: 'welcome#question'

end

Rails.application.routes.draw do

  resources :sessions, only: [:new, :create, :destroy]
  get '/login' => 'sessions#new', as: 'login'
  post '/login' => 'sessions#create'
  get '/logout' => 'sessions#destroy', as: 'logout'

  root 'questions#index'

  resources :questions

  resources :users, only: [:create, :update, :show, :destroy]
  get '/signup' => 'users#new', as: 'signup'
end

Edit Routes For User Authentication
Edit Routes For User Authentication
