Skip to content

Commit

Permalink
Disable legacy_connection_handling on Rails 6.1+ (#308)
Browse files Browse the repository at this point in the history
A new Active Record connection handler was added in Rails 6.1, however,
the old one remains the default for upgraded applications and throws
deprecation warnings under Rails 7
  • Loading branch information
HashNotAdam committed Dec 6, 2023
1 parent 0497b29 commit 69d2162
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/dummy/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,9 @@ class Application < Rails::Application
if Rails.gem_version < Gem::Version.new("6.0") && config.active_record.sqlite3
config.active_record.sqlite3.represent_boolean_as_integer = true
end

if Rails.gem_version >= Gem::Version.new("6.1")
config.active_record.legacy_connection_handling = false
end
end
end

0 comments on commit 69d2162

Please sign in to comment.