<%= form_for(@poll, html: { class: 'square' }) do |f| %>
<%= render 'shared/errors', messages: @poll.errors.full_messages %>
<%= f.label :question %>
<%= f.text_field :question %>
<%= f.label :end_date %>
<%= f.datetime_select :end_date, datetime_separator: '', time_separator: '' %>
Options
<%= f.fields_for :options do |opt| %>
<%= render 'option', f: opt %>
<% end %>
<%= link_to_add_fields "Add an Option", f, :options %>
<%= f.submit 'Save' %>
<% end %>