mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-07 06:54:16 +00:00
Added basic scaffolds for schools wrestlers and weights
This commit is contained in:
37
app/views/weights/show.html.erb
Normal file
37
app/views/weights/show.html.erb
Normal file
@@ -0,0 +1,37 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<h1>Weight Class:<%= @weight.max %></h1>
|
||||
|
||||
|
||||
<%= link_to 'Edit Weight Class', edit_weight_path(@weight) %> |
|
||||
<%= link_to 'Back to Weight Classes', weights_path %>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>School</th>
|
||||
<th>Seed</th>
|
||||
<th>Actions for wrestler</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @wrestler.each do |wrestler| %>
|
||||
<% if wrestler.weight_id == @weight.id %>
|
||||
<tr>
|
||||
<td><%= wrestler.name %></td>
|
||||
<td><%= School.find(wrestler.school_id).name %></td>
|
||||
<td><%= wrestler.original_seed %></td>
|
||||
<td><%= link_to 'Show', wrestler , :class=>"btn" %><%= link_to 'Edit', edit_wrestler_path(wrestler) , :class=>"btn" %><%= link_to 'Destroy', wrestler, method: :delete, data: { confirm: 'Are you sure?' } , :class=>"btn btn-danger" %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user