method
new
v6.0.0 -
Show latest stable
- Class:
ActiveRecord::ConnectionAdapters::ConnectionSpecification::ConnectionUrlResolver
new(url)public
Example
url = "postgresql://foo:bar@localhost:9000/foo_test?pool=5&timeout=3000" ConnectionUrlResolver.new(url).to_hash # => { "adapter" => "postgresql", "host" => "localhost", "port" => 9000, "database" => "foo_test", "username" => "foo", "password" => "bar", "pool" => "5", "timeout" => "3000" }