Sha256: 9110c0dc30e988af939beb92ad65b1dff5d26240893fee42f3f7543d40805e97
Contents?: true
Size: 551 Bytes
Versions: 29
Compression:
Stored size: 551 Bytes
Contents
# frozen_string_literal: true module Mongoid module Errors # 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 persisted and immediately being orphaned. class UnsavedDocument < MongoidError def initialize(base, document) super( compose_message( "unsaved_document", { base: base.class.name, document: document.class.name } ) ) end end end end
Version data entries
29 entries across 29 versions & 1 rubygems