Parent

Methods

Class/Module Index [+]

Quicksearch

Mongoid::Errors::UnsavedDocument

Raised when attempting to call create or create! through a references_many when the parent document has not been saved. This prevents the child from getting presisted and immediately being orphaned.

Attributes

base[R]
document[R]

Public Class Methods

new(base, document) click to toggle source
# File lib/mongoid/errors/unsaved_document.rb, line 11
def initialize(base, document)
  @base, @document = base, document
  super(
    translate(
      "unsaved_document",
      { :base => base.class.name, :document => document.class.name }
    )
  )
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.