<%= @week.contest if @week.contest %>

<%= form_for @week, html: { class: 'square' } do |f| %> <%= render 'shared/errors', messages: @week.errors.full_messages %> <%= f.hidden_field :contest_id %>
<%= f.label :name %> <%= f.text_field :name %>
<%= f.label :start_date %> <%= f.date_select :start_date %>
<%= f.label :map1_id, "1st map" %> <%= f.select :map1_id, @week.contest.maps.basic.collect{|m| [m.name, m.id]} %>
<%= f.label :map2_id, "2nd map" %> <%= f.select :map2_id, @week.contest.maps.basic.collect{|m| [m.name, m.id]} %>
<%= f.submit 'Save Week' %>
<% end %>