add errors controller with error pages for 404 500 422

This commit is contained in:
Zachary Chai
2017-03-21 15:40:14 -04:00
parent 8cf75b6051
commit b55d535d33
9 changed files with 67 additions and 202 deletions

View File

@ -18,6 +18,10 @@
Rails.application.routes.draw do
mount ActionCable.server => '/cable'
match '/404', to: 'errors#not_found', via: :all
match '/500', to: 'errors#error', via: :all
match '/422', to: 'errors#error', via: :all
resources :users, only: [:edit, :update]
get '/users/login', to: 'sessions#new', as: :user_login
get '/users/logout', to: 'sessions#destroy', as: :user_logout