Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
<%= form_for @photo, :html => {:multipart => true} do |f| %>
<% if @photo.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@photo.errors.count, "error") %> prohibited this photo from being saved:</h2>
<% @photo.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
<% end %>
<legend>Upload a Photo</legend>
<div class="field">
<%= f.file_field :image %>
<%= f.submit "Upload Photo", :class => "btn btn-small" %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment