diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-09-15 06:42:07 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-09-15 06:42:07 +0000 |
commit | 428e0f4e6321687d63ce9a431691e33971924bbc (patch) | |
tree | 7cc798945af87fadd009513b25fbd60968ae1a94 /railties/lib/initializer.rb | |
parent | 40b7809de5394b1dd9ed29875131c880b65ff766 (diff) | |
download | rails-428e0f4e6321687d63ce9a431691e33971924bbc.tar.gz rails-428e0f4e6321687d63ce9a431691e33971924bbc.tar.bz2 rails-428e0f4e6321687d63ce9a431691e33971924bbc.zip |
Added check for RAILS_CONNECTION_ADAPTERS on startup and only load the connection adapters specified within if its present (available in Rails through config.connection_adapters using the new config) #1958 [skae]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2249 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/initializer.rb')
-rw-r--r-- | railties/lib/initializer.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index 5b80ab5bd5..739a55f501 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -58,7 +58,8 @@ module Rails end def set_connection_adapters - RAILS_CONNECTION_ADAPTERS = configuration.connection_adapters + adapters = configuration.connection_adapters + silence_warnings { Object.const_set("RAILS_CONNECTION_ADAPTERS", adapters) if adapters } end def require_frameworks @@ -161,7 +162,6 @@ module Rails self.cache_classes = default_cache_classes self.breakpoint_server = default_breakpoint_server self.whiny_nils = default_whiny_nils - self.connection_adapters = default_connection_adapters self.database_configuration_file = default_database_configuration_file for framework in default_frameworks @@ -265,9 +265,5 @@ module Rails def default_whiny_nils false end - - def default_connection_adapters - %w(mysql postgresql sqlite sqlserver db2 oci) - end end end |