class Mongoid::Errors::ReadonlyDocument

Raised when attempting to persist a document that was loaded from the database with partial fields.

Public Class Methods

new(klass) click to toggle source

Instantiate the exception.

@example Create the error.

ReadonlyDocument.new(Band)

@param [ Class ] klass The document class.

Calls superclass method
# File lib/mongoid/errors/readonly_document.rb, line 17
def initialize(klass)
  super(compose_message("readonly_document", { klass: klass }))
end