Skip to content

Instantly share code, notes, and snippets.

@danhere
Created December 30, 2010 00:38
Show Gist options
  • Save danhere/759282 to your computer and use it in GitHub Desktop.
Save danhere/759282 to your computer and use it in GitHub Desktop.
Form
<%= form_for(@result, :html => {:multipart => true}) do |f| %>
<% if @result.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@result.errors.count, "error") %> prohibited this result from being saved:</h2>
<ul>
<% @result.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
Uploaded Result
<%= f.file_field :result %>
Event Title
<%= f.text_field :title %>
<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