Sha256: 4077ff4b04f2ab6582a882ac89891fac91982369aa0ee1bd0332482da2e4790e

Contents?: true

Size: 439 Bytes

Versions: 2

Compression:

Stored size: 439 Bytes

Contents

# frozen_string_literal: true
module Mongoload
  module MongoRelationsEnumerableWithAutoInclude
    private

    def unloaded_documents
      if Mongoload::RelationLoader.load(base, relation_metadata)
        base.ivar(relation_metadata.name)
      else
        super
      end
    rescue NotImplementedError
      super
    end
  end
end

Mongoid::Relations::Targets::Enumerable.prepend Mongoload::MongoRelationsEnumerableWithAutoInclude

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mongoload-0.0.2 lib/mongoload/patches/mongoid_relations_targets_enumerable_patch.rb
mongoload-0.0.1 lib/mongoload/patches/mongoid_relations_targets_enumerable_patch.rb