diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-17 19:34:18 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-17 19:34:18 +0000 |
commit | 78a732bf3ffaab0788c2962d03a059b3a8324a5f (patch) | |
tree | fa2ac0c423533df05b25529c83330c3fa8dea1f7 | |
parent | 2f944123f32ad37efc84f13de25350beb7f8fed6 (diff) | |
download | rails-78a732bf3ffaab0788c2962d03a059b3a8324a5f.tar.gz rails-78a732bf3ffaab0788c2962d03a059b3a8324a5f.tar.bz2 rails-78a732bf3ffaab0788c2962d03a059b3a8324a5f.zip |
close database.yml after reading in configuration #841 [sebastian.kanthak]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@914 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | railties/environments/shared.rb | 2 | ||||
-rw-r--r-- | railties/environments/shared_for_gem.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/railties/environments/shared.rb b/railties/environments/shared.rb index f983c74786..fa729bbe60 100644 --- a/railties/environments/shared.rb +++ b/railties/environments/shared.rb @@ -43,7 +43,7 @@ require 'action_web_service' # Environment-specific configuration. require_dependency "environments/#{RAILS_ENV}" -ActiveRecord::Base.configurations = YAML::load(File.open("#{RAILS_ROOT}/config/database.yml")) +ActiveRecord::Base.configurations = File.open("#{RAILS_ROOT}/config/database.yml") { |f| YAML::load(f) } ActiveRecord::Base.establish_connection diff --git a/railties/environments/shared_for_gem.rb b/railties/environments/shared_for_gem.rb index db6c797795..beac2e31e0 100644 --- a/railties/environments/shared_for_gem.rb +++ b/railties/environments/shared_for_gem.rb @@ -38,7 +38,7 @@ require_gem 'rails' # Environment-specific configuration. require_dependency "environments/#{RAILS_ENV}" -ActiveRecord::Base.configurations = YAML::load(File.open("#{RAILS_ROOT}/config/database.yml")) +ActiveRecord::Base.configurations = File.open("#{RAILS_ROOT}/config/database.yml") { |f| YAML::load(f) } ActiveRecord::Base.establish_connection |