Sha256: 151d4efaeb4eaa92a00ebe102019ecdf53f1e0876f9882482c755fd3bf1a8a37

Contents?: true

Size: 645 Bytes

Versions: 1

Compression:

Stored size: 645 Bytes

Contents

require "rambulance/version"
require "rambulance/railtie"

module Rambulance

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

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

  # 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

1 entries across 1 versions & 1 rubygems

Version Path
rambulance-0.1.1 lib/rambulance.rb