diff --git a/hobo/hobofields/lib/hobo_fields.rb b/hobo/hobofields/lib/hobo_fields.rb index 4b4edf7..225d8ed 100644 --- a/hobo/hobofields/lib/hobo_fields.rb +++ b/hobo/hobofields/lib/hobo_fields.rb @@ -73,7 +73,9 @@ module HoboFields return false if val.blank? && (col_type == :integer || col_type == :float || col_type == :decimal) klass = Object.instance_method(:class).bind(val).call # Make sure we get the *real* class arity = type.instance_method(:initialize).arity - (arity == 1 || arity == -1) && !@never_wrap_types.any? { |c| klass <= c } + (arity == 1 || arity == -1) && + type.instance_method(:initialize).owner != Object.instance_method(:initialize).owner && + !@never_wrap_types.any? { |c| klass <= c } end