diff options
author | Matthew Draper <matthew@trebex.net> | 2014-04-03 03:33:40 +1030 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2014-04-03 06:16:03 +1030 |
commit | 88e60a48ec7f3447225e9f5e47a251d6e1af78e2 (patch) | |
tree | 13f307aada094557215c9a00fbf237b809167f0e /railties/test/application/console_test.rb | |
parent | c82483a10abd30310f3360f6ebb6a4dddafdb2ba (diff) | |
download | rails-88e60a48ec7f3447225e9f5e47a251d6e1af78e2.tar.gz rails-88e60a48ec7f3447225e9f5e47a251d6e1af78e2.tar.bz2 rails-88e60a48ec7f3447225e9f5e47a251d6e1af78e2.zip |
Avoid a spurious deprecation warning for database URLs
This is all about the case where we have a `DATABASE_URL`, and we have a
`database.yml` present, but the latter doesn't contain the key we're
looking for.
If the key is a symbol, we'll always connect to `DATABASE_URL`, per the
new behaviour in 283a2edec2f8ccdf90fb58025608f02a63948fa0.
If the key is a string, on the other hand, it should always be a URL:
the ability to specify a name not present in `database.yml` is new in
this version of Rails, and that ability does not stretch to the
deprecated use of a string in place of a symbol.
Uncovered by @guilleiguaran while investigating #14495 -- this actually
may be related to the original report, but we don't have enough info to
confirm.
Diffstat (limited to 'railties/test/application/console_test.rb')
0 files changed, 0 insertions, 0 deletions