mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Manage ActionDispatch::ActionableExceptions from the default middleware stack
This commit is contained in:
parent
255a2422a3
commit
54df392bc5
5 changed files with 3827 additions and 62 deletions
|
@ -21,7 +21,7 @@ module ActionDispatch
|
|||
end
|
||||
|
||||
def initialize(app, routes_app = nil, response_format = :default, interceptors = self.class.interceptors)
|
||||
@app = ActionableExceptions.new(app)
|
||||
@app = app
|
||||
@routes_app = routes_app
|
||||
@response_format = response_format
|
||||
@interceptors = interceptors
|
||||
|
|
|
@ -96,6 +96,7 @@ class ActionDispatch::IntegrationTest < ActiveSupport::TestCase
|
|||
RoutedRackApp.new(routes || ActionDispatch::Routing::RouteSet.new) do |middleware|
|
||||
middleware.use ActionDispatch::ShowExceptions, ActionDispatch::PublicExceptions.new("#{FIXTURE_LOAD_PATH}/public")
|
||||
middleware.use ActionDispatch::DebugExceptions
|
||||
middleware.use ActionDispatch::ActionableExceptions
|
||||
middleware.use ActionDispatch::Callbacks
|
||||
middleware.use ActionDispatch::Cookies
|
||||
middleware.use ActionDispatch::Flash
|
||||
|
|
|
@ -49,6 +49,7 @@ module Rails
|
|||
middleware.use ::Rails::Rack::Logger, config.log_tags
|
||||
middleware.use ::ActionDispatch::ShowExceptions, show_exceptions_app
|
||||
middleware.use ::ActionDispatch::DebugExceptions, app, config.debug_exception_response_format
|
||||
middleware.use ::ActionDispatch::ActionableExceptions
|
||||
|
||||
unless config.cache_classes
|
||||
middleware.use ::ActionDispatch::Reloader, app.reloader
|
||||
|
|
|
@ -38,6 +38,7 @@ module ApplicationTests
|
|||
"Rails::Rack::Logger",
|
||||
"ActionDispatch::ShowExceptions",
|
||||
"ActionDispatch::DebugExceptions",
|
||||
"ActionDispatch::ActionableExceptions",
|
||||
"ActionDispatch::Reloader",
|
||||
"ActionDispatch::Callbacks",
|
||||
"ActiveRecord::Migration::CheckPending",
|
||||
|
@ -70,6 +71,7 @@ module ApplicationTests
|
|||
"Rails::Rack::Logger",
|
||||
"ActionDispatch::ShowExceptions",
|
||||
"ActionDispatch::DebugExceptions",
|
||||
"ActionDispatch::ActionableExceptions",
|
||||
"ActionDispatch::Reloader",
|
||||
"ActionDispatch::Callbacks",
|
||||
"Rack::Head",
|
||||
|
|
Loading…
Reference in a new issue