I am building an application with auth and basic user profiles. Currently I have users and profiles stored in separate tables, with a user_id reference on the profiles table. In the schemas, each user has_one profile and each profile belongs_to a user. Accounts.get_user/1 preloads the Profile and I understand how to display the profile data in the user/:id route. So far so good.
I’m struggling to create a form that can edit a user and their profile at once. In form.html.eex,
IO.inspect f.data.profiles shows the preloaded profile. Can someone point me to a good resource that explains how to edit multiple structs in a form? I’m lost in the docs.