aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2004-11-25 22:34:24 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2004-11-25 22:34:24 +0000
commit7ed0894c37a0222eaaa256cc9be19647c108e432 (patch)
treef5f3496b988534553b4fd2c036d2844c5b52cac6 /railties
parent55f2fcff1dc623f85fc14c7e916a02d3731da71d (diff)
downloadrails-7ed0894c37a0222eaaa256cc9be19647c108e432.tar.gz
rails-7ed0894c37a0222eaaa256cc9be19647c108e432.tar.bz2
rails-7ed0894c37a0222eaaa256cc9be19647c108e432.zip
Put establish_connection back in...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@14 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r--railties/environments/shared.rb4
-rw-r--r--railties/environments/shared_for_gem.rb3
2 files changed, 4 insertions, 3 deletions
diff --git a/railties/environments/shared.rb b/railties/environments/shared.rb
index 985d06ebe9..78628341e8 100644
--- a/railties/environments/shared.rb
+++ b/railties/environments/shared.rb
@@ -37,8 +37,9 @@ require 'action_mailer'
# Environment-specific configuration.
-require 'yaml'
ActiveRecord::Base.configurations = YAML::load(File.open("#{RAILS_ROOT}/config/database.yml"))
+ActiveRecord::Base.establish_connection
+
ActionController::Base.require_or_load 'abstract_application'
ActionController::Base.require_or_load "environments/#{RAILS_ENV}"
@@ -52,5 +53,4 @@ end
klass.template_root ||= "#{RAILS_ROOT}/app/views/"
end
-
# Include your app's configuration here:
diff --git a/railties/environments/shared_for_gem.rb b/railties/environments/shared_for_gem.rb
index 52f618563c..dde6a01db7 100644
--- a/railties/environments/shared_for_gem.rb
+++ b/railties/environments/shared_for_gem.rb
@@ -33,8 +33,9 @@ require_gem 'rails'
# Environment-specific configuration.
-require 'yaml'
ActiveRecord::Base.configurations = YAML::load(File.open("#{RAILS_ROOT}/config/database.yml"))
+ActiveRecord::Base.establish_connection
+
ActionController::Base.require_or_load 'abstract_application'
ActionController::Base.require_or_load "environments/#{RAILS_ENV}"