Class Mongoid::Relations::Builders::Referenced::One
In: lib/mongoid/relations/builders/referenced/one.rb
Parent: Builder

Methods

build  

Public Instance methods

This builder either takes an _id or an object and queries for the inverse side using the id or sets the object.

@example Build the document.

  Builder.new(meta, attrs).build

@param [ String ] type The type of document to query for.

@return [ Document ] A single document.

[Validate]