class Rexception::ExceptionsController
Constants
- STATUSES
Private Class Methods
call(env)
click to toggle source
# File lib/rexception/exceptions_controller.rb, line 34 def call(env) action(status(env)).call(env) end
exception(env)
click to toggle source
# File lib/rexception/exceptions_controller.rb, line 42 def exception(env) env['action_dispatch.exception'] end
status(env)
click to toggle source
# File lib/rexception/exceptions_controller.rb, line 38 def status(env) ActionDispatch::ExceptionWrapper.rescue_responses[exception(env).class.name] end
Private Instance Methods
errors_dir()
click to toggle source
# File lib/rexception/exceptions_controller.rb, line 29 def errors_dir Rexception.errors_dir end
layout()
click to toggle source
# File lib/rexception/exceptions_controller.rb, line 25 def layout Rexception.layout end
status()
click to toggle source
# File lib/rexception/exceptions_controller.rb, line 21 def status self.class.status(env) end
view(status = status())
click to toggle source
# File lib/rexception/exceptions_controller.rb, line 17 def view(status = status()) "#{errors_dir}/#{status}" end