Browse files

Eager autoload ActiveRecord association helpers

  • Loading branch information...
1 parent 085cb3b commit a052fc95a7e5176f66f0f896f3ced60e41794eed @michaelfairley michaelfairley committed Jul 26, 2012
Showing with 7 additions and 5 deletions.
  1. +7 −5 activerecord/lib/active_record/associations.rb
View
12 activerecord/lib/active_record/associations.rb
@@ -133,11 +133,13 @@ module Builder #:nodoc:
autoload :HasAndBelongsToMany, 'active_record/associations/builder/has_and_belongs_to_many'
end
- autoload :Preloader, 'active_record/associations/preloader'
- autoload :JoinDependency, 'active_record/associations/join_dependency'
- autoload :AssociationScope, 'active_record/associations/association_scope'
- autoload :AliasTracker, 'active_record/associations/alias_tracker'
- autoload :JoinHelper, 'active_record/associations/join_helper'
+ eager_autoload do
+ autoload :Preloader, 'active_record/associations/preloader'
+ autoload :JoinDependency, 'active_record/associations/join_dependency'
+ autoload :AssociationScope, 'active_record/associations/association_scope'
+ autoload :AliasTracker, 'active_record/associations/alias_tracker'
+ autoload :JoinHelper, 'active_record/associations/join_helper'
+ end
# Clears out the association cache.
def clear_association_cache #:nodoc:

0 comments on commit a052fc9

Please sign in to comment.