Instantly share code, notes, and snippets.

Embed
What would you like to do?
<%= form_for @changeset, @action, [multipart: true], fn f -> %>
<%= if @changeset.action do %>
<div class="alert alert-danger">
<p>Oops, something went wrong! Please check the errors below.</p>
</div>
<% end %>
<div class="form-group">
<%= label f, :image, class: "control-label" %>
<%= file_input f, :image, class: "form-control" %>
<%= error_tag f, :image %>
</div>
<div class="form-group">
<%= label f, :album_id, class: "control-label" %>
<%= text_input f, :album_id, class: "form-control" %>
<%= error_tag f, :album_id %>
</div>
<div class="form-group">
<%= submit "Submit", class: "btn btn-primary" %>
</div>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment