elixir-ecto / ecto

A toolkit for data mapping and language integrated query.
https://hexdocs.pm/ecto
Apache License 2.0
6.19k stars 1.44k forks source link

Make `Phoenix.HTML.Form.inputs_for/4` work with schemaless changesets #1915

Closed jadlr closed 7 years ago

jadlr commented 7 years ago

This has been discussed on IRC:

Currently usage of inputs_for with a schemaless changeset raises an exception:

** (exit) an exception was raised:
    ** (KeyError) key :__struct__ not found in: %{}
        (phoenix_ecto) lib/phoenix_ecto/html.ex:218: Phoenix.HTML.FormData.Ecto.Changeset.find_inputs_for_type!/2
        (phoenix_ecto) lib/phoenix_ecto/html.ex:35: Phoenix.HTML.FormData.Ecto.Changeset.to_form/4
        (phoenix_html) lib/phoenix_html/form.ex:270: Phoenix.HTML.Form.inputs_for/4

off topic: Thanks for Elixir, Ecto and Phoenix!

josevalim commented 7 years ago

I am closing this one because the issue is much deeper than originally expected. We don't allow schemaless changesets on embeds/assocs, so we first need to solve this problem and then tackle this. If someone would like to get started, please go ahead, otherwise it is low priority from our side.

kingdomcoding commented 2 years ago

I'm curious if there's any update about this?

Also, if I'm going to help, where can I look into to start?