mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
7b4fdf3ce7
Applications may not have a primary configuration so we should not assume there is one. In both these cases we can get the right connection without that. For the databases.rake file we want to re-establish a connection for the environment we're in. The first config defined under an environment for a multi-db app will win. This is already the case on application boot so we should be consistent. For the info.rb file we already have a connection so we can lookup the adapter from the connection's db_config. If a primary hadn't existed this would have thrown an exception. Followup to https://github.com/rails/rails/pull/39535 which removed the assumption there was a primary config from the schema cache load railtie. Co-authored-by: John Crepezzi <john.crepezzi@gmail.com> |
||
---|---|---|
.. | ||
active_record | ||
arel | ||
rails/generators | ||
active_record.rb | ||
arel.rb |