mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-12 08:18:44 +00:00
Added stats to wrestler -> show
This commit is contained in:
@@ -134,5 +134,11 @@ class Match < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def list_w2_stats
|
||||||
|
"#{w2_name}: #{w2_stat}"
|
||||||
|
end
|
||||||
|
|
||||||
|
def list_w1_stats
|
||||||
|
"#{w1_name}: #{w1_stat}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -39,6 +39,12 @@
|
|||||||
<h4>Matches</h4>
|
<h4>Matches</h4>
|
||||||
<br>
|
<br>
|
||||||
<% @wrestler.allMatches.each do |m| %>
|
<% @wrestler.allMatches.each do |m| %>
|
||||||
<div> Bout: <%= m.bout_number %> <%= m.bracket_position %> <%= m.wrestler1.name %> vs. <%= m.wrestler2.name %> <%= @wrestler.resultByBout(m.bout_number) %></div>
|
<div> Bout: <%= m.bout_number %> <%= m.bracket_position %> <%= m.wrestler1.name %> vs. <%= m.wrestler2.name %> <%= @wrestler.resultByBout(m.bout_number) %></div>
|
||||||
|
<% if m.w1_stat || m.w2_stat %>
|
||||||
|
<div>Stats:</div>
|
||||||
|
<div><%= m.list_w1_stats %></div>
|
||||||
|
<div><%= m.list_w2_stats %></div>
|
||||||
|
</br>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
Reference in New Issue
Block a user