Skip to content

Instantly share code, notes, and snippets.

@bqst
Created March 15, 2018 16:59
Show Gist options
  • Save bqst/3a77ff7502891d72ef67afcc488857e6 to your computer and use it in GitHub Desktop.
Save bqst/3a77ff7502891d72ef67afcc488857e6 to your computer and use it in GitHub Desktop.
# app/controllers/errors_controller.rb
# do not forget to delete public/{404, 422, 500}.html
# rm public/{404, 422, 500}.html
class ErrorsController < ApplicationController
def not_found
render status: 404
end
def unacceptable
render status: 422
end
def internal_server_error
render status: 500
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment