%= form_for(@weight) do |f| %>
<% if @weight.errors.any? %>
<%= pluralize(@weight.errors.count, "error") %> prohibited this weight from being saved:
<% @weight.errors.full_messages.each do |msg| %>
- <%= msg %>
<% end %>
<% end %>
<%= f.label :max %>
<%= f.number_field :max %>
<% if @weight %>
<%= f.hidden_field :tournament_id, :value => @tournament_field %>
<% else %>
<%= f.label 'Tournament' %>
<%= f.collection_select :tournament_id, Tournament.all, :id, :name %>
<% end %>
<%= f.label 'Assigned Mat' %>
<%= f.collection_select :mat_id, @mats, :id, :name %>
<%= f.submit %>
<% end %>