From 50ef894cbcbfb19bd5b1d814acd61ba2c1f7230e Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Fri, 29 Mar 2024 14:48:12 +0100 Subject: [PATCH] Fix Rails edge deprecations Ref: - rails/rails@7a8e58bcb3a119ed8a5b41457987784877a5e075 - rails/rails#50883 Close #278 --- spec/support/connection.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/support/connection.rb b/spec/support/connection.rb index 4cab6673..157c8ea6 100644 --- a/spec/support/connection.rb +++ b/spec/support/connection.rb @@ -5,6 +5,7 @@ module ChronoTest AR = ActiveRecord::Base + AR.automatically_invert_plural_associations = true if AR.respond_to?(:automatically_invert_plural_associations) log = ENV['VERBOSE'].present? ? $stderr : 'spec/debug.log'.tap { |f| File.open(f, 'ab') { |ft| ft.truncate(0) } } AR.logger = ::Logger.new(log).tap do |l| l.level = 0