Skip to content

Instantly share code, notes, and snippets.

@rbnpercy
Created July 6, 2018 20:03
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 rbnpercy/ce5043d6477de6b63b5ac2ca402199dd to your computer and use it in GitHub Desktop.
Save rbnpercy/ce5043d6477de6b63b5ac2ca402199dd to your computer and use it in GitHub Desktop.
<%= 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