mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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
This commit is contained in:
parent
2f944123f3
commit
78a732bf3f
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue