method

construct_id_map

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.