submit_errors: [id: {"has already been taken", []}],
When a
for_create
form is submitted, I get this error. Assuming the id
it's referring to is "form", I'm not sure why it thinks it has been taken.
The form is created using apply_action
called from the mount action (similar to the Ash twitter clone example).
3 Replies
it is not referring to the id
"form"
from the form, but the id
being used to create the record
I assume id
is the primary key, but it looks like you're trying to use a primary key that has already been used.Ahh.. I see. Thank you.
I have this to generate
id
in :create, and it seems to give me the same ID every time (even after the app is restarted). Does that sound likely?
yep 🙂
&Ash.UUID.generate/0