Skip to content

Commit

Permalink
Update spec/dummy/config/environments/test.rb
Browse files Browse the repository at this point in the history
Simplify Rails version calculation

We can use Rails.gem_version instead.

Co-authored-by: Aboobacker MK <[email protected]>
  • Loading branch information
stanhu and tachyons authored Nov 23, 2024
1 parent c06ee80 commit d201365
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/dummy/config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# Rails 7.1 deprecated false in favor of :none, but we need to use false for
# backwards compatibility: https://github.com/rails/rails/pull/45867
config.action_dispatch.show_exceptions =
Gem::Version.new(Rails.version) >= Gem::Version.new('7.1.0') ? :none : false
Rails.gem_version >= Gem::Version.new('7.1.0') ? :none : false

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

0 comments on commit d201365

Please sign in to comment.