Skip to content

Commit

Permalink
set config.action_dispatch.show_exceptions according to rails version
Browse files Browse the repository at this point in the history
  • Loading branch information
skaes committed Aug 8, 2024
1 parent 42a1ce9 commit faeff15
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion railsapp/config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
config.action_controller.perform_caching = false

# Raise exceptions instead of rendering exception templates.
config.action_dispatch.show_exceptions = false
if Rails::VERSION::STRING < "7.1"
config.action_dispatch.show_exceptions = false
else
config.action_dispatch.show_exceptions = :none
end

# Disable request forgery protection in test environment.
config.action_controller.allow_forgery_protection = false
Expand Down

0 comments on commit faeff15

Please sign in to comment.