method

add_preloaded_record_to_collection

rails latest stable - Class: ActiveRecord::AssociationPreload::ClassMethods

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.0.9) is shown here.

add_preloaded_record_to_collection(parent_records, reflection_name, associated_record)
private

No documentation available.

# File activerecord/lib/active_record/association_preload.rb, line 136
      def add_preloaded_record_to_collection(parent_records, reflection_name, associated_record)
        parent_records.each do |parent_record|
          parent_record.send("set_#{reflection_name}_target", associated_record)
        end
      end