Skip to content
This repository
Browse code

Eager autoload ActiveRecord association helpers

  • Loading branch information...
commit a052fc95a7e5176f66f0f896f3ced60e41794eed 1 parent 085cb3b
Michael Fairley michaelfairley authored

Showing 1 changed file with 7 additions and 5 deletions. Show diff stats Hide diff stats

  1. +7 5 activerecord/lib/active_record/associations.rb
12 activerecord/lib/active_record/associations.rb
@@ -133,11 +133,13 @@ module Builder #:nodoc:
133 133 autoload :HasAndBelongsToMany, 'active_record/associations/builder/has_and_belongs_to_many'
134 134 end
135 135
136   - autoload :Preloader, 'active_record/associations/preloader'
137   - autoload :JoinDependency, 'active_record/associations/join_dependency'
138   - autoload :AssociationScope, 'active_record/associations/association_scope'
139   - autoload :AliasTracker, 'active_record/associations/alias_tracker'
140   - autoload :JoinHelper, 'active_record/associations/join_helper'
  136 + eager_autoload do
  137 + autoload :Preloader, 'active_record/associations/preloader'
  138 + autoload :JoinDependency, 'active_record/associations/join_dependency'
  139 + autoload :AssociationScope, 'active_record/associations/association_scope'
  140 + autoload :AliasTracker, 'active_record/associations/alias_tracker'
  141 + autoload :JoinHelper, 'active_record/associations/join_helper'
  142 + end
141 143
142 144 # Clears out the association cache.
143 145 def clear_association_cache #:nodoc:

0 comments on commit a052fc9

Please sign in to comment.
Something went wrong with that request. Please try again.