method

new

Importance_1
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: 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"
}
Show source
Register or log in to add new notes.