Sha256: 287b7d7741a20df5f599d3779e13e5728de63edbd1f06111c6754540cfce0c49
Contents?: true
Size: 633 Bytes
Versions: 196
Compression:
Stored size: 633 Bytes
Contents
# encoding: utf-8 module Mongoid #:nodoc module Errors #:nodoc # 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. class UnsavedDocument < MongoidError attr_reader :base, :document def initialize(base, document) @base, @document = base, document super( translate( "unsaved_document", { :base => base.class.name, :document => document.class.name } ) ) end end end end
Version data entries
196 entries across 104 versions & 6 rubygems