instance method build_db_config_from_hash

Ruby on Rails 6.0.6

Since v6.0.6 Private

Available in: v6.0.6 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

build_db_config_from_hash(env_name, spec_name, config)

No documentation comment.

Parameters

env_name req
spec_name req
config req
Source
# File activerecord/lib/active_record/database_configurations.rb, line 166
      def build_db_config_from_hash(env_name, spec_name, config)
        if config.has_key?("url")
          url = config["url"]
          config_without_url = config.dup
          config_without_url.delete "url"

          ActiveRecord::DatabaseConfigurations::UrlConfig.new(env_name, spec_name, url, config_without_url)
        else
          ActiveRecord::DatabaseConfigurations::HashConfig.new(env_name, spec_name, config)
        end
      end

Defined in activerecord/lib/active_record/database_configurations.rb line 166 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::DatabaseConfigurations

Type at least 2 characters to search.

↑↓ navigate · open · esc close