lib/octoshark/connection_pools_manager.rb in octoshark-0.4.0 vs lib/octoshark/connection_pools_manager.rb in octoshark-0.5.0
- old
+ new
@@ -79,9 +79,10 @@
private
def build_connection_pool_spec(name, config)
if active_record_6_1_or_7?
env_name = defined?(Rails) ? Rails.env : nil
+ require "active_record/database_configurations"
db_config = ActiveRecord::DatabaseConfigurations::HashConfig.new(env_name, name, config)
pool_config_class = ActiveRecord::ConnectionAdapters::PoolConfig
if pool_config_class.instance_method(:initialize).arity == 2