instance method
build_db_config_from_string
Ruby on Rails 6.1.7.10
Since v6.0.6 PrivateSignature
build_db_config_from_string(env_name, name, config)
No documentation comment.
Parameters
-
env_namereq -
namereq -
configreq
Source
# File activerecord/lib/active_record/database_configurations.rb, line 228
def build_db_config_from_string(env_name, name, config)
url = config
uri = URI.parse(url)
if uri.scheme
UrlConfig.new(env_name, 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
Defined in activerecord/lib/active_record/database_configurations.rb line 228
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::DatabaseConfigurations