Skip to content

Commit 8007959

Browse files
committed
Fix: config.action_dispatch.show_exceptions has changed in Rails 7.
1 parent f1f17fc commit 8007959

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

config/environments/test.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@
2828
config.cache_store = :null_store
2929

3030
# Raise exceptions instead of rendering exception templates.
31-
config.action_dispatch.show_exceptions = false
31+
config.action_dispatch.show_exceptions = if Gem::Version.new(Rails.version) >= Gem::Version.new('7.1')
32+
:none
33+
else
34+
false
35+
end
3236

3337
# Disable request forgery protection in test environment.
3438
config.action_controller.allow_forgery_protection = false

0 commit comments

Comments
 (0)