From 1efd88283ef68d912df215125951a87526768a51 Mon Sep 17 00:00:00 2001 From: Vishnu Atrai Date: Fri, 22 Jul 2011 17:43:30 +0530 Subject: lazy load ConnectionAdapters remove require. --- activerecord/lib/active_record.rb | 3 ++- activerecord/lib/active_record/base.rb | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record.rb b/activerecord/lib/active_record.rb index 59cf42a377..d63b9e3f24 100644 --- a/activerecord/lib/active_record.rb +++ b/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 diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 25074c2d4f..00f986b3ce 100644 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -2163,6 +2163,4 @@ MSG 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) -- cgit v1.2.3