From 5cbe8dd9685b688c87b49cc9aff68b48fce6f52c Mon Sep 17 00:00:00 2001 From: Philipp Rothmann Date: Tue, 17 Jan 2023 14:37:10 +0100 Subject: [PATCH] fix database_config --- app/lib/foodsoft_config.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/foodsoft_config.rb b/app/lib/foodsoft_config.rb index 2893a3e3..6ea166d3 100644 --- a/app/lib/foodsoft_config.rb +++ b/app/lib/foodsoft_config.rb @@ -230,7 +230,7 @@ class FoodsoftConfig end def setup_database - database_config = ActiveRecord::Base.configurations[Rails.env] + database_config = ActiveRecord::Base.configurations.find_db_config(Rails.env).configuration_hash database_config = database_config.merge(config[:database]) if config[:database].present? ActiveRecord::Base.establish_connection(database_config) end