app/views/admin/agendas/_form.html.erb
<%= form_for([:admin, @agenda]) do |f| %>
<% if @agenda.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@agenda.errors.count, "error") %> proibiram essa agenda de ser salva:</h2>
<ul>
<% @agenda.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="grid_6">
<div class="field">
<%= f.label :title %>
<%= f.text_field :title %>
</div>
<div class="field">
<%= f.label :type %>
<%= f.select :type, Agenda::TYPES.collect{|type| [t("agenda.types.#{type}"), type]} %>
</div>
<div class="field">
<%= f.label :date %>
<%= f.datetime_select :date %>
</div>
<div class="field">
<%= f.label :description %>
<%= f.text_area :description %>
</div>
<div class="field">
<%= f.label :place %>
<%= f.text_area :place %>
</div>
<div class="actions">
<%= f.submit %>
</div>
</div>
<% end %>