mathieuprog / polymorphic_embed

Polymorphic embeds in Ecto
Apache License 2.0
325 stars 63 forks source link

to_form/5 does not respect custom field type #67

Closed woylie closed 4 months ago

woylie commented 1 year ago

PolymorphicEmbed.HTML.Form.to_form/5 always sets the name of the hidden input field for the type to __type__, even if a custom type field is defined in the schema.

https://github.com/mathieuprog/polymorphic_embed/blob/master/lib/polymorphic_embed/html/form.ex#L153

See #68 for tests.