Sha256: 7a1f264bd0a72c700cdd199656aec28974b3ce75e9af527ae2fa53c4a76dc11b
Contents?: true
Size: 812 Bytes
Versions: 19
Compression:
Stored size: 812 Bytes
Contents
# frozen_string_literal: true module Mongoid module Errors # This error is raised when trying to define a field using a :type option value # that is not present in the field type mapping. class InvalidFieldType < MongoidError # Create the new error. # # @example Instantiate the error. # InvalidFieldType.new('Person', 'first_name', 'stringgy') # # @param [ String ] klass The model class. # @param [ String ] field The field on which the invalid type is used. # @param [ Symbol | String ] type The value of the field :type option. def initialize(klass, field, type) super( compose_message('invalid_field_type', klass: klass, field: field, type_inspection: type.inspect) ) end end end end
Version data entries
19 entries across 19 versions & 1 rubygems