Closed joshuay03 closed 5 months ago
I think this usage also needs to be updated: https://github.com/DatabaseCleaner/database_cleaner-active_record/blob/aafa5b273bebf9432353fc8a65ce1e8b449cecb0/lib/database_cleaner/active_record/truncation.rb#L33
Otherwise you get a "Called deprecated ActiveRecord::Base.connection
method." deprecation warning.
@ghiculescu Addressed 👍🏽
Context: https://github.com/rails/rails/pull/51349
~Ensures that applications using
config.active_record.permanent_connection_checkout = :disallowed
are supported from Rails 7.2 onwards.~ This was what this PR started as, but this would require a significant API change looking at how the#start
and#clean
APIs are used.Addresses the deprecation of
ActiveRecord::Base.connection
in favour ofActiveRecord::Base.lease_connection
as of Rails 7.2.There's one more usage of
.connection
but that seems to be getting removed in #101.