Nested form example
While applying the example on this page to my project, https://ash-hq.org/docs/module/ash_phoenix/latest/ashphoenix-form, I ran into this error.
Can you please give me some pointers?
<my code in TweetEdit>
<lib/ashphoenix/form/form.ex>
def for_action(resource_or_data, action, opts) do
{resource, data} =
case resource_or_data do
module when is_atom(resource_or_data) -> {module, module.struct()}
%resource{} = data -> {resource, data}
end
ash_phoenix lib/ash_phoenix/form/form.ex:379 AshPhoenix.Form.for_action/3
ash_phoenix lib/ash_phoenix/form/form.ex:3480 AshPhoenix.Form.handle_form_without_params/13
elixir lib/enum.ex:2468 Enum."-reduce/3-lists^foldl/2-0-"/3
ash_phoenix lib/ash_phoenix/form/form.ex:538 AshPhoenix.Form.for_update/3
lib/tweet_web/live/tweet_live/tweet_edit.ex:21 TweetLive.TweetEdit.mount/3
```
Can you please give me some pointers?
<my code in TweetEdit>
<lib/ashphoenix/form/form.ex>
``
import AshPhoenix.FormData.Helpers
@doc "Calls the corresponding for*` function depending on the action type"def for_action(resource_or_data, action, opts) do
{resource, data} =
case resource_or_data do
module when is_atom(resource_or_data) -> {module, module.struct()}
%resource{} = data -> {resource, data}
end
ash_phoenix lib/ash_phoenix/form/form.ex:379 AshPhoenix.Form.for_action/3
ash_phoenix lib/ash_phoenix/form/form.ex:3480 AshPhoenix.Form.handle_form_without_params/13
elixir lib/enum.ex:2468 Enum."-reduce/3-lists^foldl/2-0-"/3
ash_phoenix lib/ash_phoenix/form/form.ex:538 AshPhoenix.Form.for_update/3
lib/tweet_web/live/tweet_live/tweet_edit.ex:21 TweetLive.TweetEdit.mount/3
```
Ash HQ
Read the "Getting Started With Ash And Phoenix" guide on Ash HQ

