Skip to content
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 database adapter detection for nested config #1056

Merged
merged 1 commit into from
Aug 7, 2023

Conversation

mjankowski
Copy link
Contributor

When a database yml is configured with nested named databases (for example: primary, read, replica, etc) the adapter detection fails by only looking for a top-level adapter key in the hash.

This changes the detection to try the top-level location first, and then also attempt to look for an adapter key in the first nested hash under development as well.

When a database yml is configured with nested named databases (for
example: `primary`, `read`, `replica`, etc) the adapter detection fails
by only looking for a top-level `adapter` key in the hash.

This changes the detection to try the top-level location first, and then
also attempt to look for an `adapter` key in the first nested hash under
`development` as well.
@koic koic merged commit 6202d3e into rubocop:master Aug 7, 2023
10 checks passed
@koic
Copy link
Member

koic commented Aug 7, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants