mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
33 lines
808 B
Plaintext
33 lines
808 B
Plaintext
<%= form_for(@school) do |f| %>
|
|
<% if @school.errors.any? %>
|
|
<div id="error_explanation">
|
|
<h2><%= pluralize(@school.errors.count, "error") %> prohibited this school from being saved:</h2>
|
|
|
|
<ul>
|
|
<% @school.errors.full_messages.each do |msg| %>
|
|
<li><%= msg %></li>
|
|
<% end %>
|
|
</ul>
|
|
</div>
|
|
<% end %>
|
|
|
|
<div class="field">
|
|
<%= f.label :name %><br>
|
|
<%= f.text_field :name %>
|
|
</div>
|
|
|
|
<% if @school %>
|
|
<%= 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 %>
|
|
<br>
|
|
|
|
<div class="actions">
|
|
<%= f.submit 'Submit', :class=>"btn btn-success" %>
|
|
</div>
|
|
<% end %>
|