app/views/calendars/_form.html.erb
<%= form_for @calendar do |f| %>
<%= f.error_messages %>
<p>
<%= f.label :name %><br />
<%= f.text_field :name %>
</p>
<p>
<%= f.label :start_date %><br />
<%= f.date_select :start_date %>
</p>
<p>
<%= f.label :end_date %> <br />
<%= f.date_select :end_date %><br />
(note that the calendar ends at midnight, so events cannot be created on this day)<br />
</p>
<% if @calendar.new_record? %>
<p>
<%= f.label :active %><br />
<%= f.check_box :active %>
</p>
<% end %>
<p>
<%= f.label :public, 'Public (accessible by regular users)' %><br />
<%= f.check_box :public %>
</p>
<p><%= f.submit "Submit" %></p>
<% end %>