diff options
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/CHANGELOG | 2 | ||||
-rwxr-xr-x | activerecord/lib/active_record.rb | 15 |
2 files changed, 10 insertions, 7 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index 090258e07a..463f784036 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,7 @@ *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 + * Fixed various problems with has_and_belongs_to_many when using customer finder_sql #2094 [Florian Weber] * Added better exception error when unknown column types are used with migrations #1814 [fbeausoleil@ftml.net] diff --git a/activerecord/lib/active_record.rb b/activerecord/lib/active_record.rb index ac3f12239a..d7e7201e73 100755 --- a/activerecord/lib/active_record.rb +++ b/activerecord/lib/active_record.rb @@ -63,11 +63,12 @@ ActiveRecord::Base.class_eval do include ActiveRecord::Acts::NestedSet end -require 'active_record/connection_adapters/mysql_adapter' -require 'active_record/connection_adapters/postgresql_adapter' -require 'active_record/connection_adapters/sqlite_adapter' -require 'active_record/connection_adapters/sqlserver_adapter' -require 'active_record/connection_adapters/db2_adapter' -require 'active_record/connection_adapters/oci_adapter' +unless defined?(RAILS_CONNECTION_ADAPTERS) + RAILS_CONNECTION_ADAPTERS = %w(mysql postgresql sqlite sqlserver db2 oci) +end + +RAILS_CONNECTION_ADAPTERS.each do |adapter| + require "active_record/connection_adapters/#{adapter}_adapter" +end -require 'active_record/query_cache' +require 'active_record/query_cache'
\ No newline at end of file |