1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-08 15:29:20 +00:00

Cleaning up views and controllers

This commit is contained in:
2015-11-04 07:10:20 -05:00
parent 3695800001
commit a38c959d0c
9 changed files with 32 additions and 31 deletions

View File

@@ -1,7 +1,7 @@
<%= link_to "Back to #{@tournament_name}", "/tournaments/#{@tournament_id}", :class=>"btn btn-default" %>
<br>
<br>
<% if @tournament %>
<% if params[:tournament] %>
<% @weights.each do |weight| %>
<%= link_to "#{weight.max}" , "/static_pages/weigh_in?weight=#{weight.id}" %>
<br>

View File

@@ -21,12 +21,12 @@
<% else %>
<div class="field">
<%= f.label 'School' %><br>
<%= f.collection_select :school_id, School.all, :id, :name %>
<%= f.collection_select :school_id, @tournament.schools, :id, :name %>
</div>
<% end %>
<div class="field">
<%= f.label 'Weight Class' %><br>
<%= f.collection_select :weight_id, @weight, :id, :max %>
<%= f.collection_select :weight_id, @weights, :id, :max %>
</div>
<div class="field">