mirror of https://github.com/rails/rails
Merge pull request #38670 from eileencodes/remove-unnecessary-lines
Remove unnecessary creation of new hash config
This commit is contained in:
commit
526dd6472b
|
@ -184,17 +184,13 @@ module ActiveRecord
|
|||
end
|
||||
end
|
||||
|
||||
def resolve_symbol_connection(env_name, pool_name)
|
||||
db_config = find_db_config(env_name)
|
||||
|
||||
if db_config
|
||||
config = db_config.configuration_hash.dup
|
||||
db_config = DatabaseConfigurations::HashConfig.new(db_config.env_name, db_config.name, config)
|
||||
def resolve_symbol_connection(name, pool_name)
|
||||
if db_config = find_db_config(name)
|
||||
db_config.owner_name = pool_name.to_s
|
||||
db_config
|
||||
else
|
||||
raise AdapterNotSpecified, <<~MSG
|
||||
The `#{env_name}` database is not configured for the `#{default_env}` environment.
|
||||
The `#{name}` database is not configured for the `#{default_env}` environment.
|
||||
|
||||
Available databases configurations are:
|
||||
|
||||
|
|
Loading…
Reference in New Issue