Skip to content

Instantly share code, notes, and snippets.

@ArunGupta25
Created June 6, 2012 19:08
Show Gist options
  • Save ArunGupta25/2883997 to your computer and use it in GitHub Desktop.
Save ArunGupta25/2883997 to your computer and use it in GitHub Desktop.
<%= 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>
<ul>
<% @photo.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.label :shared %><br />
<%= f.check_box :shared %>
</div>
<div class="field">
<%= f.label :user_id %><br />
<%= f.number_field :user_id %>
</div>
<div class="field">
<%= f.file_field :image %><br />
</div>
<div class="actions">
<%= f.submit %>
</div>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment