method

resolve_pool_config

Importance_1
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: ActiveRecord::ConnectionAdapters::ConnectionHandler
resolve_pool_config(config, connection_name, role, shard) private

Returns an instance of PoolConfig for a given adapter. Accepts a hash one layer deep that contains all connection information.

Example

config = { "production" => { "host" => "localhost", "database" => "foo", "adapter" => "sqlite3" } }
pool_config = Base.configurations.resolve_pool_config(:production)
pool_config.db_config.configuration_hash
# => { host: "localhost", database: "foo", adapter: "sqlite3" }
Show source
Register or log in to add new notes.