errors_controller.rb 247 B

1234567891011121314
  1. class ErrorsController < ApplicationController
  2. def not_found
  3. render(status: 404)
  4. end
  5. def internal_server_error
  6. render(status: 500)
  7. end
  8. def show
  9. status = params[:code] || 500
  10. render status.to_s, status: status
  11. end
  12. end