-
Register your application by appending this to config/application.rb:
config.exceptions_app = self.routes -
Add routes by appending this to config/routes.rb:
match '/404', :to => 'errors#not_found' match '/422', :to => 'errors#server_error' match '/500', :to => 'errors#server_error' -
Add an ErrorsController and views by running:
rails g controller Errors not_found server_error -
View custom error pages locally by setting this in config/development.rb
config.consider_all_requests_local = false
Last active
December 17, 2015 11:29
-
-
Save smockle/5602264 to your computer and use it in GitHub Desktop.
Errors explains how to enable custom errors in Rails.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment