Module: Rambulance

Defined in:
lib/rambulance/engine.rb,
lib/rambulance.rb,
lib/rambulance/railtie.rb,
lib/rambulance/version.rb,
lib/rambulance/test_helper.rb,
lib/rambulance/exceptions_app.rb,
lib/generators/rambulance/install_generator.rb,
lib/generators/rambulance/exceptions_app_generator.rb

Overview

:nodoc:

Defined Under Namespace

Modules: Generators, TestHelper Classes: Engine, ExceptionsApp, Railtie

Constant Summary collapse

VERSION =
"1.1.0"
ERROR_HTTP_STATUSES =
Rack::Utils::SYMBOL_TO_STATUS_CODE.select do |status_in_words, http_status|
  # Exclude http statuses that:
  #   * represent a successful status(2xx, 3xx)
  #   * are unassigned(427, 430, 509)
  #   * is a joke definition(418)
  http_status >= 400 && ![418, 427, 430, 509].include?(http_status)
end.invert
@@rescue_responses =
{}
@@layout_name =
"application"
@@view_path =
"errors"

Class Method Summary collapse

Class Method Details

.rescue_responses=(rescue_responses) ⇒ Object



20
21
22
23
# File 'lib/rambulance.rb', line 20

def self.rescue_responses=(rescue_responses)
  @@rescue_responses = rescue_responses
  ActionDispatch::ExceptionWrapper.rescue_responses.merge!(rescue_responses)
end

.setup {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (Rambulance)

    the object that the method was called on



25
26
27
# File 'lib/rambulance.rb', line 25

def self.setup
  yield self
end