Skip to content

Commit

Permalink
Added check for RAILS_CONNECTION_ADAPTERS on startup and only load th…
Browse files Browse the repository at this point in the history
…e 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
  • Loading branch information
dhh committed Sep 15, 2005
1 parent 40b7809 commit 428e0f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion activerecord/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
*SVN*

* 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
* 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]

* Fixed various problems with has_and_belongs_to_many when using customer finder_sql #2094 [Florian Weber]

Expand Down
8 changes: 2 additions & 6 deletions railties/lib/initializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ def set_load_path
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
Expand Down Expand Up @@ -161,7 +162,6 @@ def initialize
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
Expand Down Expand Up @@ -265,9 +265,5 @@ def default_breakpoint_server
def default_whiny_nils
false
end

def default_connection_adapters
%w(mysql postgresql sqlite sqlserver db2 oci)
end
end
end

0 comments on commit 428e0f4

Please sign in to comment.