Sha256: ab376fe57b3fddd38c9c3a9984354e0b03acc6875f4c96692710c91a17e2ef9f

Contents?: true

Size: 624 Bytes

Versions: 67

Compression:

Stored size: 624 Bytes

Contents

# encoding: utf-8
module Mongoid
  module Errors

    # Raised when attempting to destroy a document that had destory callbacks
    # return false.
    #
    # @since 4.0.0
    class DocumentNotDestroyed < MongoidError

      # Instnatiate the exception.
      #
      # @example Create the error.
      #   DocumentNotDestroyed.new(Band)
      #
      # @param [ Object ] id The document id.
      # @param [ Class ] klass The document class.
      #
      # @since 4.0.0
      def initialize(id, klass)
        super(compose_message("document_not_destroyed", { id: id.inspect, klass: klass }))
      end
    end
  end
end

Version data entries

67 entries across 62 versions & 3 rubygems

Version Path
mongoid-7.0.13 lib/mongoid/errors/document_not_destroyed.rb
mongoid-7.0.12 lib/mongoid/errors/document_not_destroyed.rb
mongoid-6.4.8 lib/mongoid/errors/document_not_destroyed.rb
mongoid-7.0.11 lib/mongoid/errors/document_not_destroyed.rb
mongoid-7.0.10 lib/mongoid/errors/document_not_destroyed.rb
mongoid-6.4.7 lib/mongoid/errors/document_not_destroyed.rb
mongoid-6.4.5 lib/mongoid/errors/document_not_destroyed.rb
mongoid-7.0.8 lib/mongoid/errors/document_not_destroyed.rb
mongoid-7.0.7 lib/mongoid/errors/document_not_destroyed.rb
mongoid-7.0.6 lib/mongoid/errors/document_not_destroyed.rb
mongoid-5.4.1 lib/mongoid/errors/document_not_destroyed.rb
mongoid-7.0.5 lib/mongoid/errors/document_not_destroyed.rb
mongoid-7.0.4 lib/mongoid/errors/document_not_destroyed.rb
mongoid-6.4.4 lib/mongoid/errors/document_not_destroyed.rb
mongoid-7.0.3 lib/mongoid/errors/document_not_destroyed.rb
mongoid-6.4.2 lib/mongoid/errors/document_not_destroyed.rb
mongoid-7.0.2 lib/mongoid/errors/document_not_destroyed.rb
mongoid-7.0.1 lib/mongoid/errors/document_not_destroyed.rb
mongoid-6.4.1 lib/mongoid/errors/document_not_destroyed.rb
mongoid-5.4.0 lib/mongoid/errors/document_not_destroyed.rb