Sha256: b59c121927c8e6efb8f076f5157dba47b4a802e1d51b0bd596b15dbf6a4eed54
Contents?: true
Size: 672 Bytes
Versions: 9
Compression:
Stored size: 672 Bytes
Contents
# frozen_string_literal: true module Mongoid module Errors # This error is raised when trying to set a value in Mongoid that is not # already set with dynamic attributes or the field is not defined. class UnknownAttribute < MongoidError # Create the new error. # # @example Instantiate the error. # UnknownAttribute.new(Person, "gender") # # @param [ Class ] klass The model class. # @param [ String, Symbol ] name The name of the attribute. def initialize(klass, name) super( compose_message("unknown_attribute", { klass: klass.name, name: name }) ) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems