diff options
author | Jon Leighton <j@jonathanleighton.com> | 2012-07-26 01:05:17 -0700 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2012-07-26 01:05:17 -0700 |
commit | 07c455d94f0439d243382eac56808bc4e36338d2 (patch) | |
tree | 0cf66bb8f780ba1c80c6938808bf0adb74f72fad | |
parent | dc464b93ec221f74c621278f03dacb93597d9d00 (diff) | |
parent | a052fc95a7e5176f66f0f896f3ced60e41794eed (diff) | |
download | rails-07c455d94f0439d243382eac56808bc4e36338d2.tar.gz rails-07c455d94f0439d243382eac56808bc4e36338d2.tar.bz2 rails-07c455d94f0439d243382eac56808bc4e36338d2.zip |
Merge pull request #7161 from michaelfairley/eager_load_active_record_association_helpers
Eager autoload ActiveRecord association helpers
-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 6124fe315f..7df9edfc98 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -133,11 +133,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: |