Sha256: f430f85b811721c0373e9f5057e065a599cf7f233d8a21dd94a0fab69ddef524
Contents?: true
Size: 586 Bytes
Versions: 14
Compression:
Stored size: 586 Bytes
Contents
# frozen_string_literal: true class ErrorsController < ::ApplicationController layout "errors" def show render_error params[:id].to_i end def forbidden render_error 403 end def not_found render_error 404 end def unacceptable render_error 422 end def unauthorized render_error 401 end def internal_error exception = request.env["action_dispatch.exception"] if exception wrapper = ActionDispatch::ExceptionWrapper.new(nil, exception) render_error wrapper.status_code else render_error 500 end end end
Version data entries
14 entries across 14 versions & 1 rubygems