Sha256: 44e192ce1fef2b8af3dfacdd463835374b44dbf8b6baefa62c7b7a4124f85887
Contents?: true
Size: 708 Bytes
Versions: 12
Compression:
Stored size: 708 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: # # <tt>DocumentNotFound.new(Person, ["1", "2"])</tt> 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
12 entries across 12 versions & 3 rubygems