Skip to content

Commit

Permalink
trying stuff out
Browse files Browse the repository at this point in the history
  • Loading branch information
jwoodrow authored Nov 12, 2023
1 parent 3b569e1 commit 1ca41c6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/patches/active_record/rails7_1/serialization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ def serialize(attr_name, class_name_or_coder = Object, **options)

super(attr_name, **options)

coder = build_column_serializer(attr_name, options[:coder], options[:type], options[:yaml])
coder = if options[:coder] == ::YAML || options[:coder] == Coders::YAMLColumn
options[:coder]
else
build_column_serializer(attr_name, options[:coder], options[:type], options[:yaml])
end

self.globalize_serialized_attributes = globalize_serialized_attributes.dup
self.globalize_serialized_attributes[attr_name] = coder
Expand Down

0 comments on commit 1ca41c6

Please sign in to comment.