Ash FrameworkAF
Ash Framework3y ago
4 replies
Robert Graff

Bulk create form

I currently have a phoenix form to create an invite. The form is connected to the create action on the Invite resource. The only field is email.

I want to change the form to accept multiple email addresses--comma separated--and then create multiple invites. The create action currently generates a token and sends an email, so it's bit more complicated than a db insert.

I haven't used manual actions, the new bulk_create feature, or Ash.Flow yet. I'm not sure which is the best route.

I'm thinking of adding a manual bulk_create action to my resource that calls the existing create for each email address.

Feedback?
Was this page helpful?