method

build_db_config_from_string

Importance_0
v6.0.0 - Show latest stable - 0 notes - Class: DatabaseConfigurations
build_db_config_from_string(env_name, spec_name, config) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/database_configurations.rb, line 156
      def build_db_config_from_string(env_name, spec_name, config)
        url = config
        uri = URI.parse(url)
        if uri.scheme
          ActiveRecord::DatabaseConfigurations::UrlConfig.new(env_name, spec_name, url)
        else
          raise InvalidConfigurationError, "'{ #{env_name} => #{config} }' is not a valid configuration. Expected '#{config}' to be a URL string or a Hash."
        end
      end
Register or log in to add new notes.