{@thread.name}

rgraff
2023-06-08

rgraff:

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?

zachdaniel:

I think that is your best bet for now 🙂

zachdaniel:

At some point, I’d like to support the new “generic actions” in AshPhoenix.Form , since those can essentially do whatever you want

zachdaniel:

I’d also like to support AshPhoenix.FlowForm at some point

zachdaniel:

but until those things happen, a manual create action is a reasonable bet.