Sha256: 8c9d29685dfa883c384876def385eb33e5e7d24b2123a1d2f6e50f36d66885fe
Contents?: true
Size: 612 Bytes
Versions: 14
Compression:
Stored size: 612 Bytes
Contents
# encoding: utf-8 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
14 entries across 14 versions & 1 rubygems