Skip to content

Instantly share code, notes, and snippets.

@abitdodgy
Last active November 21, 2016 19:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abitdodgy/3d60a63e22d6f252d77e054f2048b450 to your computer and use it in GitHub Desktop.
Save abitdodgy/3d60a63e22d6f252d77e054f2048b450 to your computer and use it in GitHub Desktop.
Medium Article: Building Many-To-Many Associations with Embedded Schemas in Ecto and Phoenix
<%= form_for @changeset, registration_path(@conn, :create), fn f -> %>
<div class="form-group">
<%= label f, :org_name %>
<%= text_input f, :org_name, class: "form-control" %>
<%= error_tag f, :org_name %>
</div>
<div class="form-group">
<%= label f, :email %>
<%= text_input f, :email, class: "form-control" %>
<%= error_tag f, :email %>
</div>
<%= submit "Create", class: "btn btn-primary" %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment