method

resolve_symbol_connection

Importance_2
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.

These similar methods exist in v7.1.3.2:

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" }
Show source
Register or log in to add new notes.