1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Added stats to wrestler -> show

This commit is contained in:
2017-11-14 07:43:06 -05:00
parent 62faa4f307
commit 0c9af7fcb3
2 changed files with 28 additions and 16 deletions

View File

@@ -134,5 +134,11 @@ class Match < ActiveRecord::Base
end
end
def list_w2_stats
"#{w2_name}: #{w2_stat}"
end
def list_w1_stats
"#{w1_name}: #{w1_stat}"
end
end

View File

@@ -40,5 +40,11 @@
<br>
<% @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>
<% 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 %>