Sha256: b7a02f516d42643a021c8a73a6b7844c805794100fac16282eb8799ce8467c1a
Contents?: true
Size: 712 Bytes
Versions: 188
Compression:
Stored size: 712 Bytes
Contents
# encoding: utf-8 module Mongoid #:nodoc module Errors #:nodoc # Raised when querying the database for a document by a specific id which # does not exist. If multiple ids were passed then it will display all of # those. # # @example Create the error. # DocumentNotFound.new(Person, ["1", "2"]) class DocumentNotFound < MongoidError attr_reader :klass, :identifiers def initialize(klass, ids) @klass = klass @identifiers = ids.is_a?(Array) ? ids.join(", ") : ids super( translate( "document_not_found", { :klass => klass.name, :identifiers => identifiers } ) ) end end end end
Version data entries
188 entries across 96 versions & 4 rubygems