Sha256: 33023bc77b60f156fcd9e5ceb3b690f4eeea05e2a7f778e04a5efc3209725fb5
Contents?: true
Size: 513 Bytes
Versions: 27
Compression:
Stored size: 513 Bytes
Contents
class ErrorsController < ActionController::Base # layout to show with your errors. make sure it's not that fancy because we're # handling errors. layout 'application' def show @exception = env['action_dispatch.exception'] @status = ActionDispatch::ExceptionWrapper.new(env, @exception).status_code # @response = ActionDispatch::ExceptionWrapper.rescue_responses[@exception.class.name] # response contains the error name ex: 404 => "not found" render status: @status end end
Version data entries
27 entries across 27 versions & 1 rubygems