rails/rails — pull request #13541 by schneems (2013-12-30 16:26:50+00:00)
Title: Allow "url" sub key in database.yml configuration

Currently a developer can pass in a YAML configuration that fully specifies connection information:

```
production:
database: triage_production
adapter: password
pool: 5
```

They can also pass in a string that specifies a connection URL directly to an environment key:

```
production: postgresql://localhost/foo
```

This PR allows the use of both a connection url and specifying connection attributes via YAML through the use of the "url" sub key:

```
production:
url: postgresql://localhost/foo
pool: 3
```

This will allow developers to inherit Active Record options such as `pool` from `&defaults` and still use a secure connection url such as `<%= ENV['DATABASE_URL'] %>`. The URL is expanded into a hash and then merged back into the YAML hash. If there are any conflicts, the values from the connection URL are preferred.

Talked this over with @josevalim