method
add_preloaded_records_to_collection
add_preloaded_records_to_collection(parent_records, reflection_name, associated_record)
private
Hide source
# File activerecord/lib/active_record/association_preload.rb, line 124 def add_preloaded_records_to_collection(parent_records, reflection_name, associated_record) parent_records.each do |parent_record| association_proxy = parent_record.send(reflection_name) association_proxy.loaded association_proxy.target.push(*[associated_record].flatten) end end