Sha256: 59aa8a964e87f678e5a8bfbae5c3dc0568e5b2ea4249e675076eb50119ac1df7
Contents?: true
Size: 1015 Bytes
Versions: 1
Compression:
Stored size: 1015 Bytes
Contents
$:.unshift File.expand_path('../../../lib', __FILE__) require 'action_controller/railtie' require 'action_view/railtie' require 'rexception' module Dummy class Application < Rails::Application config.secret_token = 'abcdefghijklmnopqrstuvwxyz0123456789' config.session_store :cookie_store, key: '_dummy_session' config.eager_load = false config.active_support.deprecation = :log end end Dummy::Application.initialize! Dummy::Application.routes.draw do get '/application_error', to: 'errors#application_error' get '/forbidden', to: 'errors#forbidden' end class CustomException < StandardError end class ApplicationController < ActionController::Base end class ErrorsController < ApplicationController def application_error raise Exception end def forbidden raise CustomException end end Rexception.configure do |config| config.layout = 'layout' config.errors_dir = 'errors_dir' config.rescue_responses = { 'CustomException' => :forbidden } end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rexception-0.1.0 | spec/dummy/application.rb |