loading...

re: Does Phoenix make database CRUD too easy? VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Well, I usually don't :D But I use Ecto to normalize some parameters and returns that have nothing to do with the database (like returns from ext...

Elixir Forum is back up, so I can link you directly to the issue.

Basically, I'm presenting a schema that embeds two other schemas to use in a single form within Phoenix.HTML.Form.form_for/4. This schema is then translated into an Ecto.Multi for committing. However, if there's an error I lose some of the context when translating back from the Ecto.Multi from the schema-of-schemas.

This is all to work around what I see as a deficiency in the impl for Ecto.Changeset in Phoenix.HTML.FormData.form_for_errors/1. It doesn't play nicely with the error state for my construct.

There is likely a better way to do what I'm trying to do, but I'm still wrapping my head around this. :)

code of conduct - report abuse