New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix two-level database configurations with URLs #32396

Merged
merged 1 commit into from Mar 31, 2018

Conversation

Projects
None yet
2 participants
@eugeneius
Member

eugeneius commented Mar 31, 2018

Fixes #32393.

An entry in ActiveRecord::Base.configurations can either be a connection spec ("two-level") or a hash of specs ("three-level").

We were detecting two-level configurations by looking for the database key, but the database can also be specified as part of the url key, which meant we incorrectly treated those configurations as three-level.

r? @eileencodes

Fix two-level database configurations with URLs
An entry in `ActiveRecord::Base.configurations` can either be a
connection spec ("two-level") or a hash of specs ("three-level").

We were detecting two-level configurations by looking for the `database`
key, but the database can also be specified as part of the `url` key,
which meant we incorrectly treated those configurations as three-level.

@eileencodes eileencodes merged commit 11b884e into rails:master Mar 31, 2018

2 checks passed

codeclimate All good!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@eileencodes

This comment has been minimized.

Show comment
Hide comment
@eileencodes

eileencodes Mar 31, 2018

Member

Thanks for fixing @eugeneius 😄

Member

eileencodes commented Mar 31, 2018

Thanks for fixing @eugeneius 😄

@eugeneius

This comment has been minimized.

Show comment
Hide comment
@eugeneius

eugeneius Mar 31, 2018

Member

No problem! The application I work on has a custom multi-database setup, so I'm very excited for better support to land in Rails 🎉

Let me know if I can help in any way!

Member

eugeneius commented Mar 31, 2018

No problem! The application I work on has a custom multi-database setup, so I'm very excited for better support to land in Rails 🎉

Let me know if I can help in any way!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment