diff options
-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 |