ElixirWeekly: The Elixir Community Newsletter, covering community news you easily miss, shared on ElixirStatus and the web, in one email every Thursday.
In this episode, I answered a learner’s question about how to create and update
belongs_to associations with Phoenix forms.
The short answer is:
<%= inputs_for f, :your_association, fn f2 -> %> block inside your form and put the labels and inputs for the associated inside of that.