Module: Mongoid::Association::Builders

Extended by:
ActiveSupport::Concern
Included in:
Mongoid::Association
Defined in:
lib/mongoid/association/builders.rb

Overview

This module is responsible for defining the build and create methods used in one to one associations.

Examples:

Methods that get created.


class Person
  include Mongoid::Document
  embeds_one :name
end

# The following methods get created:
person.build_name({ :first_name => "Durran" })
person.create_name({ :first_name => "Durran" })