Example of :create action with simultaneous assignment of relationship
Perhaps I'm too influenced by Django, but I've been trying to :create a new instance of a resource that
belongs_to
belongs_to
two other resource types by passing the other resources'
.id
.id
values as parameters in the map, to no avail.
Following the Getting Started guide, I understand how I first create the Ticket resource instance and a Representative resource instance and then use the
:assign
:assign
update action to assign the ticket to the representative.
However, how would I go about creating a ticket with the representative already being assigned during the
:create
:create
action?
If this is possible, what would it look like if I were to create a ticket with more than one related resources at once?
The Elixir backend framework for unparalleled productivity. Declarative tools that let you stop wasting time. Use with Phoenix LiveView or build APIs in minutes for your front-end of choice.