1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00
Files
wrestlingdev.com/app/views/weights/_form.html.erb
2014-01-30 10:38:50 -05:00

32 lines
769 B
Plaintext

<%= form_for(@weight) do |f| %>
<% if @weight.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@weight.errors.count, "error") %> prohibited this weight from being saved:</h2>
<ul>
<% @weight.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.label :max %><br>
<%= f.number_field :max %>
</div>
<% if @weight %>
<%= f.hidden_field :tournament_id, :value => @tournament_field %>
<% else %>
<div class="field">
<%= f.label 'Tournament' %><br>
<%= f.collection_select :tournament_id, Tournament.all, :id, :name %>
</div>
<% end %>
<div class="actions">
<%= f.submit %>
</div>
<% end %>