method

resolve_connection

Importance_1
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: Resolver

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v6.0.0) is shown here.

resolve_connection(config_or_env, pool_name = nil) private

Returns fully resolved connection, accepts hash, string or symbol. Always returns a hash.

Examples

Symbol representing current environment.

Resolver.new("production" => {}).resolve_connection(:production)
# => {}

One layer deep hash of connection values.

Resolver.new({}).resolve_connection("adapter" => "sqlite3")
# => { "adapter" => "sqlite3" }

Connection URL.

Resolver.new({}).resolve_connection("postgresql://localhost/foo")
# => { "host" => "localhost", "database" => "foo", "adapter" => "postgresql" }
Show source
Register or log in to add new notes.