Skip to content

Commit ad0719d

Browse files
committed
values_writer/writer: add support for arrays
1 parent c497b5d commit ad0719d

File tree

1 file changed

+6
-1
lines changed
  • lib/panko/impl/attributes_writer/active_record/values_writer

1 file changed

+6
-1
lines changed

lib/panko/impl/attributes_writer/active_record/values_writer/writer.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ def write(writer, attribute, value)
4646
return
4747
end
4848

49-
# TODO: validate against arrays
49+
if attribute.type.respond_to?(:subtype)
50+
# TODO: test this.
51+
writer.push_value(attribute.type.deserialize(value), key)
52+
return
53+
end
54+
5055
written = case attribute.type.type
5156
when :string, :text, :uuid
5257
@string_writer.write(value, writer, key)

0 commit comments

Comments
 (0)