diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 7b5544a9cb..6085df7d9f 100644 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -331,3 +331,6 @@ module ActiveRecord #:nodoc: self.connection_handler = ConnectionAdapters::ConnectionHandler.new end end + +require 'active_record/connection_adapters/abstract/connection_specification' +ActiveSupport.run_load_hooks(:active_record, ActiveRecord::Model::DeprecationProxy) diff --git a/activerecord/lib/active_record/model.rb b/activerecord/lib/active_record/model.rb index 2801938729..44051f1a71 100644 --- a/activerecord/lib/active_record/model.rb +++ b/activerecord/lib/active_record/model.rb @@ -81,7 +81,7 @@ module ActiveRecord end end end -end -require 'active_record/connection_adapters/abstract/connection_specification' -ActiveSupport.run_load_hooks(:active_record, ActiveRecord::Model::DeprecationProxy) + # Load Base at this point, because the active_record load hook is run in that file. + Base +end