Make sure that we set `env["action_dispatch.show_exceptions"]`
This has been used by `show_exception` middleware even the setting wasn't get passed to `env` hash.
This commit is contained in:
parent
13547c16d9
commit
439a74520d
|
@ -122,7 +122,8 @@ module Rails
|
|||
@env_config ||= super.merge({
|
||||
"action_dispatch.parameter_filter" => config.filter_parameters,
|
||||
"action_dispatch.secret_token" => config.secret_token,
|
||||
"action_dispatch.asset_path" => nil
|
||||
"action_dispatch.asset_path" => nil,
|
||||
"action_dispatch.show_exceptions" => config.action_dispatch.show_exceptions
|
||||
})
|
||||
end
|
||||
|
||||
|
|
|
@ -318,5 +318,20 @@ module ApplicationTests
|
|||
|
||||
assert ActionView::Resolver.caching?
|
||||
end
|
||||
|
||||
test "config.action_dispatch.show_exceptions is sent in env" do
|
||||
make_basic_app do |app|
|
||||
app.config.action_dispatch.show_exceptions = true
|
||||
end
|
||||
|
||||
class ::OmgController < ActionController::Base
|
||||
def index
|
||||
render :text => env["action_dispatch.show_exceptions"]
|
||||
end
|
||||
end
|
||||
|
||||
get "/"
|
||||
assert_equal 'true', last_response.body
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue