diff options
author | Eileen Uchitelle <eileencodes@gmail.com> | 2019-01-30 09:31:35 -0500 |
---|---|---|
committer | Eileen Uchitelle <eileencodes@gmail.com> | 2019-01-30 09:31:35 -0500 |
commit | dedcc1950613b4c756ca7fdc449d0d9315bb39aa (patch) | |
tree | ea4ad1130b658aba4a5da971ffa23b420bdfa09e /actionview/test/fixtures/customers/_customer.xml.erb | |
parent | 9bb07b79e4bd855f24c098ba636dae15340e03ed (diff) | |
download | rails-dedcc1950613b4c756ca7fdc449d0d9315bb39aa.tar.gz rails-dedcc1950613b4c756ca7fdc449d0d9315bb39aa.tar.bz2 rails-dedcc1950613b4c756ca7fdc449d0d9315bb39aa.zip |
Fix case when we want a UrlConfig but the URL is nil
Previously if the `url` key in a config hash was nil we'd ignore the
configuration as invalid. This can happen when you're relying on a
`DATABASE_URL` in the env and that is not set in the environment.
```
production:
<<: *default
url: ENV['DATABASE_URL']
```
This PR fixes that case by checking if there is a `url` key in the
config instead of checking if the `url` is not nil in the config.
In addition to changing the conditional we then need to build a url hash
to merge with the original hash in the `UrlConfig` object.
Fixes #35091
Diffstat (limited to 'actionview/test/fixtures/customers/_customer.xml.erb')
0 files changed, 0 insertions, 0 deletions