Sha256: cac27b63928b6ec739ee66d2d01fb54c7d98b16d1273da90e58098df3486a69c

Contents?: true

Size: 707 Bytes

Versions: 7

Compression:

Stored size: 707 Bytes

Contents

require "rambulance/version"
require "rambulance/railtie"
require "rambulance/engine"
require "rambulance/test_helper"

module Rambulance

  # List of custom pairs of exception/corresponding http status.
  mattr_reader :rescue_responses
  @@rescue_responses = {}

  # The name of the layout file for the error pages.
  mattr_accessor :layout_name
  @@layout_name = "application"

  # The directry name to organize error page templates.
  mattr_accessor :view_path
  @@view_path = "errors"

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

  def self.setup
    yield self
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rambulance-1.1.1 lib/rambulance.rb
rambulance-1.1.0 lib/rambulance.rb
rambulance-1.0.3 lib/rambulance.rb
rambulance-1.0.2 lib/rambulance.rb
rambulance-1.0.1 lib/rambulance.rb
rambulance-1.0.0 lib/rambulance.rb
rambulance-0.6.0 lib/rambulance.rb