Sha256: faf0ce924d642fb00346f7a896a20efb15e7db95015047862b00214d5722b2c7
Contents?: true
Size: 584 Bytes
Versions: 14
Compression:
Stored size: 584 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