Skip to content

Instantly share code, notes, and snippets.

@daya
Created October 18, 2017 21:43
Show Gist options
  • Save daya/8ca6ee2939b8a4ecc8b520f145fc5105 to your computer and use it in GitHub Desktop.
Save daya/8ca6ee2939b8a4ecc8b520f145fc5105 to your computer and use it in GitHub Desktop.
form.eex
<h1>New User</h1>
<%= form_for @changeset, user_path(@conn, :create), fn f -> %>
<div class="form-group">
<%= text_input f, :name, placeholder: "Name", class: "form-control" %>
</div>
<div class="form-group">
<%= text_input f, :username, placeholder: "Username", class: "form-control" %>
</div>
<div class="form-group">
<%= password_input f, :password, placeholder: "Password", class: "form-control" %>
</div>
<%= submit "Create User", class: "btn btn-primary" %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment