unepwcmc/SAPI

View on GitHub
app/views/admin/events/_form.html.erb

Summary

Maintainability
Test Coverage
<%= form_for [:admin, @event], :remote => true do |f| %>

  <%= error_messages_for(@event) %>
  <label>Designation</label>
  <%= f.select :designation_id,
    options_from_collection_for_select(@designations, :id, :name, @event && @event.designation_id)
  %><br />
  <label>Name</label><%= f.text_field :name %><br />
  <label>Effective from</label>
  <%= f.text_field :effective_at, :class => "datepicker",
    :value => @event.effective_at_formatted
  %>
  <label>URL</label><%= f.text_area :url %><br />
  <label>Description</label><%= f.text_area :description %><br />
<% end %>