diff options
author | eileencodes <eileencodes@gmail.com> | 2018-04-12 15:40:59 -0400 |
---|---|---|
committer | eileencodes <eileencodes@gmail.com> | 2018-04-12 16:40:35 -0400 |
commit | 4a68792df7f2cecf9e6d9ddb18dfe761f553eb2a (patch) | |
tree | f201ab33b9c1e4918a60f89e3b1c9940c0b6938e /activerecord/lib/active_record/timestamp.rb | |
parent | 23d4091a1f9ef4693050823264fc1b6d345f1b7a (diff) | |
download | rails-4a68792df7f2cecf9e6d9ddb18dfe761f553eb2a.tar.gz rails-4a68792df7f2cecf9e6d9ddb18dfe761f553eb2a.tar.bz2 rails-4a68792df7f2cecf9e6d9ddb18dfe761f553eb2a.zip |
Fix database.yml merging
Ok so apparently you can not just have a `default:` that manually is
merged in with YAML but you can also have a special "shared" config that
is automatically merged.
Example:
```
shared:
adapter: mysql2
host: <%= ENV["DB_HOST"] || "localhost" %>
username: root
connect_timeout: 0
pool: 100
reconnect: true
development:
database: development_db
adapter: mysql2
```
To fix, only create a DatabaseConfig object when an adapter, database,
or URL are present.
The merging behavior for `shared` doesn't work with a 3-tier config. I
don't think it worked before this change either - since Rails doesn't
know which point to merge it in. That's something we may have to fix
with the refactoring I'm working on.
Diffstat (limited to 'activerecord/lib/active_record/timestamp.rb')
0 files changed, 0 insertions, 0 deletions