method

resolve_symbol_connection

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_symbol_connection(env_name, pool_name)
private

Takes the environment such as :production or :development and a pool name the corresponds to the name given by the connection pool to the connection. That pool name is merged into the hash with the name key.

This requires that the @configurations was initialized with a key that matches.

configurations = #<ActiveRecord::DatabaseConfigurations:0x00007fd9fdace3e0
  @configurations=[
    #<ActiveRecord::DatabaseConfigurations::HashConfig:0x00007fd9fdace250
      @env_name="production", @spec_name="primary", @config={"database"=>"my_db"}>
    ]>

Resolver.new(configurations).resolve_symbol_connection(:production, "primary")
# => { "database" => "my_db" }