Skip to content

Instantly share code, notes, and snippets.

@thekarladam
Created December 1, 2010 00:42
Show Gist options
  • Save thekarladam/722729 to your computer and use it in GitHub Desktop.
Save thekarladam/722729 to your computer and use it in GitHub Desktop.
<%= form_for(@event, :url => url_for(:controller => "events", :conference => @conference)) do |f| %>
<% if @event.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@event.errors.count, "error") %> prohibited this event from being saved:</h2>
<ul>
<% @event.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.label :title %><br />
<%= f.text_field :title %>
</div>
<div class="field">
<%= f.label :type %><br />
<%= f.text_field :type %>
</div>
<div class="field">
<%= f.label :start %><br />
<%= f.datetime_select :start %>
</div>
<div class="field">
<%= f.label :end %><br />
<%= f.datetime_select :end %>
</div>
<div class="field">
<%= f.label :location %><br />
<%= f.text_field :location %>
</div>
<div class="field">
<%= f.label :description %><br />
<%= f.text_field :description %>
</div>
<div class="field">
<%= f.label :parent_event_id %><br />
<%= f.text_field :parent_event_id %>
</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