protocol Enumerable not implemented for #Ash.Changeset
I apologize if I abuse the support channel, please tell me if I should take this to #general or #archive-debugging
I've ran into this issue on two different resources, and I'll detail both below. The tl;dr is: I define a
code_interface
for a resource, but when I call the function it fails with protocol Enumerable not implemented for #Ash.Changeset<action_type: :create...
at (ash 2.6.27) lib/ash/changeset/changeset.ex:998: Ash.Changeset.cast_params/3
Resource the first
I want to generate an "external id" on creation, so I expose a new
acton via code_interface.
Then calling it:
I'll continue with the second resource in the comments3 Replies
The support forum is exactly where all questions like this should go 🙂 👍
define_for
should point at the api module that needs to be called
define_for Telepai.App
(if that is what your API module is called)
Thats also why it was yelling at you about defining create
, because it tries to call Api.create(....)
Resource the second
This one is somewhat trickier as it only contains relationships to other resources:
Using it:
Oh my 😄
That's probably the reason 🙂
Ahahaha. YES. I should read the docs more carefully
@Zach Daniel thank you!
My pleasure 😄