Permalink
Browse files

Don't eager load all this

Some are loaded from Base which is loaded when a model inherits from it
and some others are used in rake tasks
  • Loading branch information...
spastorino committed Aug 3, 2012
1 parent 55b2488 commit 572ecaef17837550996cf86fabad17c2103e5a7e
Showing with 33 additions and 32 deletions.
  1. +33 −32 activerecord/lib/active_record.rb
@@ -32,6 +32,28 @@
module ActiveRecord
extend ActiveSupport::Autoload
+ autoload :Base
+ autoload :Callbacks
+ autoload :Core
+ autoload :CounterCache
+ autoload :ConnectionHandling
+ autoload :DynamicMatchers
+ autoload :Explain
+ autoload :Inheritance
+ autoload :Integration
+ autoload :Migration
+ autoload :Migrator, 'active_record/migration'
+ autoload :Model
+ autoload :ModelSchema
+ autoload :NestedAttributes
+ autoload :Observer
+ autoload :Persistence
+ autoload :QueryCache
+ autoload :Querying
+ autoload :ReadonlyAttributes
+ autoload :Reflection
+ autoload :Sanitization
+
# ActiveRecord::SessionStore depends on the abstract store in Action Pack.
# Eager loading this class would break client code that eager loads Active
# Record standalone.
@@ -42,6 +64,17 @@ module ActiveRecord
# session store its autoload happens at boot time.
autoload :SessionStore
+ autoload :Schema
+ autoload :SchemaDumper
+ autoload :SchemaMigration
+ autoload :Scoping
+ autoload :Serialization
+ autoload :Store
+ autoload :Timestamp
+ autoload :Transactions
+ autoload :Translation
+ autoload :Validations
+
eager_autoload do
autoload :ActiveRecordError, 'active_record/errors'
autoload :ConnectionNotEstablished, 'active_record/errors'
@@ -63,42 +96,10 @@ module ActiveRecord
autoload :PredicateBuilder
autoload :SpawnMethods
autoload :Batches
- autoload :Explain
autoload :Delegation
end
- autoload :Base
- autoload :Callbacks
- autoload :Core
- autoload :CounterCache
- autoload :ConnectionHandling
- autoload :DynamicMatchers
- autoload :Explain
- autoload :Inheritance
- autoload :Integration
- autoload :Migration
- autoload :Migrator, 'active_record/migration'
- autoload :Model
- autoload :ModelSchema
- autoload :NestedAttributes
- autoload :Observer
- autoload :Persistence
- autoload :QueryCache
- autoload :Querying
- autoload :ReadonlyAttributes
- autoload :Reflection
autoload :Result
- autoload :Sanitization
- autoload :Schema
- autoload :SchemaDumper
- autoload :SchemaMigration
- autoload :Scoping
- autoload :Serialization
- autoload :Store
- autoload :Timestamp
- autoload :Transactions
- autoload :Translation
- autoload :Validations
end
module Coders

0 comments on commit 572ecae

Please sign in to comment.