diff options
author | eileencodes <eileencodes@gmail.com> | 2018-02-20 12:58:01 -0500 |
---|---|---|
committer | eileencodes <eileencodes@gmail.com> | 2018-02-21 16:01:35 -0500 |
commit | bf0495de58ed4a0f4f5b5e079c3e758d6b6b132c (patch) | |
tree | d944a3899e4370c10b70614c4152657b869a63c5 /activerecord/lib/active_record/tasks | |
parent | 23c5558f37c2c55807e7603415214f2b4b7b22c1 (diff) | |
download | rails-bf0495de58ed4a0f4f5b5e079c3e758d6b6b132c.tar.gz rails-bf0495de58ed4a0f4f5b5e079c3e758d6b6b132c.tar.bz2 rails-bf0495de58ed4a0f4f5b5e079c3e758d6b6b132c.zip |
Delete default configuration
Because of this default configuration we're constantly checking if the
database exists when looping through configurations. This is unnecessary
and we should just delete it before we need to loop through
configurations.
Diffstat (limited to 'activerecord/lib/active_record/tasks')
-rw-r--r-- | activerecord/lib/active_record/tasks/database_tasks.rb | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/tasks/database_tasks.rb b/activerecord/lib/active_record/tasks/database_tasks.rb index d8e0cd1e30..0883e80d23 100644 --- a/activerecord/lib/active_record/tasks/database_tasks.rb +++ b/activerecord/lib/active_record/tasks/database_tasks.rb @@ -315,16 +315,12 @@ module ActiveRecord environments << "test" if environment == "development" ActiveRecord::Base.configurations.slice(*environments).each do |configuration_environment, configuration| - next unless configuration["database"] - yield configuration, configuration_environment end end def each_local_configuration ActiveRecord::Base.configurations.each_value do |configuration| - next unless configuration["database"] - if local_database?(configuration) yield configuration else |