Skip to content

Commit

Permalink
close database.yml after reading in configuration #841 [sebastian.kan…
Browse files Browse the repository at this point in the history
…thak]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@914 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Mar 17, 2005
1 parent 2f94412 commit 78a732b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion railties/environments/shared.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

# 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


Expand Down
2 changes: 1 addition & 1 deletion railties/environments/shared_for_gem.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

# 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


Expand Down

0 comments on commit 78a732b

Please sign in to comment.