Convert Embedded Schema struct to persisted schema

Let’s say you have a changeset for %Signup{} in signup_changeset. You could write something like this:

  case Ecto.Changeset.apply_action(signup_changeset, :insert) do
    {:ok, signup} ->
      # use signup.email etc to populate Profile and
      #  Account records and save to the DB
    {:error, changeset} ->
      # do something to tell the caller about the errors in `changeset`
  end