Skip to content

Commit ec2c266

Browse files
committed
Remove deprecated support to set Rails.application.config.action_dispatch.show_exceptions to true and false
1 parent 30193dc commit ec2c266

File tree

4 files changed

+6
-36
lines changed

4 files changed

+6
-36
lines changed

actionpack/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
* Remove deprecated support to set `Rails.application.config.action_dispatch.show_exceptions` to `true` and `false`.
2+
3+
*Rafael Mendonça França*
4+
15
* Remove deprecated `speaker`, `vibrate`, and `vr` permissions policy directives.
26

37
*Rafael Mendonça França*

actionpack/lib/action_dispatch/middleware/exception_wrapper.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,6 @@ def show?(request)
186186
false
187187
when :rescuable
188188
rescue_response?
189-
when true
190-
ActionDispatch.deprecator.warn("Setting action_dispatch.show_exceptions to true is deprecated. Set to :all instead.")
191-
true
192-
when false
193-
ActionDispatch.deprecator.warn("Setting action_dispatch.show_exceptions to false is deprecated. Set to :none instead.")
194-
false
195189
else
196190
true
197191
end

actionpack/test/dispatch/exception_wrapper_test.rb

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -225,35 +225,5 @@ def backtrace
225225

226226
assert_equal true, wrapper.show?(request)
227227
end
228-
229-
test "#show? emits a deprecation when show_exceptions is true" do
230-
exception = RuntimeError.new("")
231-
wrapper = ExceptionWrapper.new(nil, exception)
232-
233-
env = { "action_dispatch.show_exceptions" => true }
234-
request = ActionDispatch::Request.new(env)
235-
236-
msg = "Setting action_dispatch.show_exceptions to true is deprecated. Set to :all instead."
237-
result = assert_deprecated(msg, ActionDispatch.deprecator) do
238-
wrapper.show?(request)
239-
end
240-
241-
assert_equal true, result
242-
end
243-
244-
test "#show? emits a deprecation when show_exceptions is false" do
245-
exception = RuntimeError.new("")
246-
wrapper = ExceptionWrapper.new(nil, exception)
247-
248-
env = { "action_dispatch.show_exceptions" => false }
249-
request = ActionDispatch::Request.new(env)
250-
251-
msg = "Setting action_dispatch.show_exceptions to false is deprecated. Set to :none instead."
252-
result = assert_deprecated(msg, ActionDispatch.deprecator) do
253-
wrapper.show?(request)
254-
end
255-
256-
assert_equal false, result
257-
end
258228
end
259229
end

guides/source/7_2_release_notes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ Please refer to the [Changelog][action-pack] for detailed changes.
6060

6161
* Remove deprecated `speaker`, `vibrate`, and `vr` permissions policy directives.
6262

63+
* Remove deprecated support to set `Rails.application.config.action_dispatch.show_exceptions` to `true` and `false`.
64+
6365
### Deprecations
6466

6567
* Deprecate `Rails.application.config.action_controller.allow_deprecated_parameters_hash_equality`.

0 commit comments

Comments
 (0)