Flowdock
method

construct_id_map

Importance_0
v2.1.0 - Show latest stable - 0 notes - Class: ActiveRecord::AssociationPreload::ClassMethods
construct_id_map(records) 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 82
      def construct_id_map(records)
        id_to_record_map = {}
        ids = []
        records.each do |record|
          ids << record.id
          mapped_records = (id_to_record_map[record.id.to_s] ||= [])
          mapped_records << record
        end
        ids.uniq!
        return id_to_record_map, ids
      end
Register or log in to add new notes.