Sha256: a494a5f946c9f65361ab3e9d7861b2a2fbd9c0b8f3e4979e6f22dbbbde4a8783
Contents?: true
Size: 625 Bytes
Versions: 25
Compression:
Stored size: 625 Bytes
Contents
# frozen_string_literal: true module Mongoid module Association module Referenced class HasOne class Eager < Association::Referenced::Eager::Base private def preload @docs.each do |d| set_relation(d, nil) end each_loaded_document do |doc| id = doc.send(key) set_on_parent(id, doc) end end def group_by_key @association.primary_key end def key @association.foreign_key end end end end end end
Version data entries
25 entries across 25 versions & 1 rubygems