Flowdock
method

construct_id_map

Importance_1
v2.3.8 - Show latest stable - 0 notes - Class: ActiveRecord::AssociationPreload::ClassMethods
construct_id_map(records, primary_key=nil) private

Given a collection of ActiveRecord objects, constructs a Hash which maps the objects’ IDs to the relevant objects. Returns a 2-tuple (id_to_record_map, ids) where id_to_record_map is the Hash, and ids is an Array of record IDs.

Show source
Register or log in to add new notes.