1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00
Files
wrestlingdev.com/app/views/mats/_form.html.erb

27 lines
641 B
Plaintext

<%= form_for(@mat) do |f| %>
<% if @mat.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@mat.errors.count, "error") %> prohibited this mat from being saved:</h2>
<ul>
<% @mat.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.label :name, 'Mat Number' %><br>
<%= f.text_field :name %>
</div>
<% if @tournament %>
<%= f.hidden_field :tournament_id, :value => @tournament.id %>
<% end %>
<br>
<div class="actions">
<%= f.submit 'Submit', :class=>"btn btn-success" %>
</div>
<% end %>