Skip to content
Browse files

Merge pull request #2185 from castlerock/lazy_load_abstract_adapter

lazy load ConnectionAdapters remove require.
  • Loading branch information...
2 parents 9327b4d + 1efd882 commit a14f4566dd640b1a90e86872d82b83a2282459e6 @tenderlove tenderlove committed Jul 23, 2011
Showing with 2 additions and 3 deletions.
  1. +2 −1 activerecord/lib/active_record.rb
  2. +0 −2 activerecord/lib/active_record/base.rb
View
3 activerecord/lib/active_record.rb
@@ -41,7 +41,8 @@ module ActiveRecord
eager_autoload do
autoload :ActiveRecordError, 'active_record/errors'
autoload :ConnectionNotEstablished, 'active_record/errors'
-
+ autoload :ConnectionAdapters, 'active_record/connection_adapters/abstract_adapter'
+
autoload :Aggregations
autoload :Associations
autoload :AttributeMethods
View
2 activerecord/lib/active_record/base.rb
@@ -2166,6 +2166,4 @@ def clear_timestamp_attributes
end
end
-# TODO: Remove this and make it work with LAZY flag
-require 'active_record/connection_adapters/abstract_adapter'
ActiveSupport.run_load_hooks(:active_record, ActiveRecord::Base)

0 comments on commit a14f456

Please sign in to comment.
Something went wrong with that request. Please try again.