Skip to content

Commit

Permalink
Update to use configs_for
Browse files Browse the repository at this point in the history
  • Loading branch information
amy-hs committed Jan 3, 2024
1 parent 01072ec commit d0e2a7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/knockoff/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def replica_env_keys
end

def update_replica_configs(new_configs)
ActiveRecord::Base.configurations['knockoff_replicas'].merge(new_configs) if ActiveRecord::Base.configurations['knockoff_replicas'].present?
ActiveRecord::Base.configurations.configs_for(env_name: 'knockoff_replicas').merge(new_configs) if ActiveRecord::Base.configurations.configs_for(env_name: 'knockoff_replicas').present?
@replicas_configurations.each do |key, _config|
update_replica_config(key, new_configs)
end
Expand Down

0 comments on commit d0e2a7f

Please sign in to comment.