Method: ActiveRecord::Relation#preload_associations
- Defined in:
- activerecord/lib/active_record/relation.rb
#preload_associations(records) ⇒ Object
:nodoc:
1303 1304 1305 1306 1307 1308 1309 1310 |
# File 'activerecord/lib/active_record/relation.rb', line 1303 def preload_associations(records) # :nodoc: preload = preload_values preload += includes_values unless eager_loading? scope = strict_loading_value ? StrictLoadingScope : nil preload.each do |associations| ActiveRecord::Associations::Preloader.new(records: records, associations: associations, scope: scope).call end end |