How to add_tag? Managing Relationships
I try to adapt https://ash-hq.org/docs/guides/ash/latest/topics/managing-relationships for an application where a
product
which has a many_to_many
relationship to tags
.
lib/app/shop/resources/product.ex
I get this error:
How can I fix that?3 Replies
I think you mean for the
add_tag
to be inside the first argument's map
App.Shop.Product.create!(%{name: "Banana", add_tag: %{name: "Yellow"}})
Thank you! I did not see that.
also we need to handle that
NimbleOptions.ValidationError
that is unnecessarily hard to read