method
resolve_pool_config
v8.0.0 -
Show latest stable
- 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" }