diff options
author | Michael Fairley <michaelfairley@gmail.com> | 2012-07-25 17:34:39 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2012-10-10 15:39:49 -0700 |
commit | de1b687239832f336b9453493701955ab4d6d6a2 (patch) | |
tree | 3a0197e586f752c4b2c42e74a7ffac55b90e702d /activerecord | |
parent | fb9c00116bb7277f61a9d3ef5c399457f26056a4 (diff) | |
download | rails-de1b687239832f336b9453493701955ab4d6d6a2.tar.gz rails-de1b687239832f336b9453493701955ab4d6d6a2.tar.bz2 rails-de1b687239832f336b9453493701955ab4d6d6a2.zip |
Eager autoload ActiveRecord association helpers
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/associations.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index 5aa9e26fa6..b74ff62c09 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -135,11 +135,13 @@ module ActiveRecord 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: |