mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
4a68792df7
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. |
||
---|---|---|
.. | ||
active_record | ||
rails/generators | ||
active_record.rb |