Flowdock
method

add_preloaded_records_to_collection

Importance_0
Ruby on Rails latest stable (v4.0.2) - 0 notes - 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_records_to_collection(parent_records, reflection_name, associated_record) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/association_preload.rb, line 126
      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(*Array.wrap(associated_record))

          association_proxy.__send__(:set_inverse_instance, associated_record, parent_record)
        end
      end
Register or log in to add new notes.