We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d104c7 commit c893b8fCopy full SHA for c893b8f
lib/mongoid/errors/invalid_field_type_definition.rb
@@ -15,9 +15,11 @@ class InvalidFieldTypeDefinition < MongoidError
15
# @param [ Object ] field_type The object which is expected to a be Symbol or String.
16
# @param [ Object ] klass The object which is expected to be a Class or Module.
17
def initialize(field_type, klass)
18
+ type_inspection = field_type.try(:inspect) || field_type.class.inspect
19
+ klass_inspection = klass.try(:inspect) || klass.class.inspect
20
super(
21
compose_message('invalid_field_type_definition',
- type_inspection: field_type.inspect, klass_inspection: klass.inspect)
22
+ type_inspection: type_inspection, klass_inspection: klass_inspection)
23
)
24
end
25
0 commit comments