Fill in `has_many` relationship while creating a new record

Yes, I ended up splitting creation and updating in 2 different flows:

  • In create, I run a multi where I first create the course then I create the associations with the course’s new ID
  • In update, I just fill in the course_id and run it through the changeset normally

It’s so much more complicated than I expected it to be, but it does the job.