class Mongoid::Errors::DeleteRestriction
an association with dependency option set to restrict.
This error is raised when attempting to destroy a model which has
def initialize(document, association_name)
-
association_name(Symbol) -- The name of the dependent -
document(Document) -- The document that was attempted to be
def initialize(document, association_name) super( compose_message( "delete_restriction", { document: document.class, relation: association_name } ) ) end