AshPhoenix.Form.for_update required api option even when resource already defines it

My resource already defines its api using:

  use Ash.Resource,
    api: Core.Feedbacks,

If I try to use that resource the AshPhoenix.Form.for_update, I will need to still define the api option otherwise the function will complain.

Shouldn’t AshPhoenix.Form use the resource api if available instead of requiring the user to redefine it in the function call?

EDIT: The same question is valid for AshPhoenix.Form.for_create as well.

This was added to ash_phoenix but has not yet been released. feat: #133 use resource defined Api by pierrelegall · Pull Request #134 · ash-project/ash_phoenix · GitHub

I will cut a release soon.

1 Like

Released in version 1.3.2

1 Like