diff --git a/lib/patches/active_record/rails7_1/serialization.rb b/lib/patches/active_record/rails7_1/serialization.rb index fb3ac6fa..029dd93c 100644 --- a/lib/patches/active_record/rails7_1/serialization.rb +++ b/lib/patches/active_record/rails7_1/serialization.rb @@ -5,7 +5,7 @@ def serialize(attr_name, class_name_or_coder = Object, **options) if class_name_or_coder == ::JSON || [:load, :dump].all? { |x| class_name_or_coder.respond_to?(x) } options = options.merge(coder: class_name_or_coder, type: Object) else - options = options.merge(type: class_name_or_coder) + options = options.merge(code: default_column_serializer, type: class_name_or_coder) end super(attr_name, **options)