From ec641309f4686385bf8a47b167501a899d7e16d5 Mon Sep 17 00:00:00 2001 From: Joe Rafaniello Date: Mon, 5 Feb 2024 17:08:10 -0500 Subject: [PATCH] connection_config was removed in rails 7 https://github.com/rails/rails/commit/54ddb3be31b3baeeb68f855e1525f4fd58fc257d --- lib/vmdb/appliance.rb | 2 +- tools/fix_auth/fix_auth.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vmdb/appliance.rb b/lib/vmdb/appliance.rb index 385b1404fe8..f708c1daf5d 100644 --- a/lib/vmdb/appliance.rb +++ b/lib/vmdb/appliance.rb @@ -76,7 +76,7 @@ def self.log_config(*args) fh.info("---") fh.info("DATABASE settings:") - fh.log_hashes(ActiveRecord::Base.connection_config) + fh.log_hashes(ActiveRecord::Base.connection_db_config.configuration_hash) fh.info("DATABASE settings END") fh.info("---") end diff --git a/tools/fix_auth/fix_auth.rb b/tools/fix_auth/fix_auth.rb index 9a55cdf0bda..2b55e2853c8 100644 --- a/tools/fix_auth/fix_auth.rb +++ b/tools/fix_auth/fix_auth.rb @@ -61,7 +61,7 @@ def fix_database_passwords begin # in specs, this is already setup - ActiveRecord::Base.connection_config + ActiveRecord::Base.connection_db_config rescue ActiveRecord::ConnectionNotEstablished # From the command line, we want to connect to a database ActiveRecord::Base.logger = Logger.new("#{options[:root]}/log/fix_auth.log")