mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
Added when they last wrestled
This commit is contained in:
@@ -9,6 +9,7 @@ class Wrestler < ActiveRecord::Base
|
||||
before_create do
|
||||
self.tournament.destroyAllMatches
|
||||
end
|
||||
|
||||
|
||||
def lastFinishedMatch
|
||||
allMatches.select{|m| m.finished == 1}.sort_by{|m| m.bout_number}.last
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
<th><%= @w1.name %> <select id="w1-color" onchange="changeW1Color(this)">
|
||||
<option value="green">Green</option>
|
||||
<option value="red">Red</option>
|
||||
</select></th>
|
||||
</select><br>Last Match: <%= if @w1.lastMatch != nil then time_ago_in_words(@w1.lastMatch.updated_at) end%></th>
|
||||
<th><%= @w2.name %> <select id="w2-color" onchange="changeW2Color(this)">
|
||||
<option value="red">Red</option>
|
||||
<option value="green">Green</option>
|
||||
</select></th>
|
||||
</select><br>Last Match: <%= if @w2.lastMatch != nil then time_ago_in_words(@w2.lastMatch.updated_at) end%></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
Reference in New Issue
Block a user