Credo v1.1.0 released (Credo Plugins are here!) Pattern Matching is FP's Polymorphism Affordance

How do you update relations in Phoenix forms?

In this episode, I answered a learner’s question about how to create and update has_one and belongs_to associations with Phoenix forms.

The short answer is:

use a <%= inputs_for f, :your_association, fn f2 -> %> block inside your form and put the labels and inputs for the associated inside of that.

https://alchemist.camp/episodes/belongs-to-has-one-forms

ElixirWeekly: The Elixir Community Newsletter, covering community news you easily miss, shared on ElixirStatus and the web, in one email every Thursday.