mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-13 16:40:48 +00:00
Added when they last wrestled
This commit is contained in:
@@ -9,6 +9,7 @@ class Wrestler < ActiveRecord::Base
|
|||||||
before_create do
|
before_create do
|
||||||
self.tournament.destroyAllMatches
|
self.tournament.destroyAllMatches
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def lastFinishedMatch
|
def lastFinishedMatch
|
||||||
allMatches.select{|m| m.finished == 1}.sort_by{|m| m.bout_number}.last
|
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)">
|
<th><%= @w1.name %> <select id="w1-color" onchange="changeW1Color(this)">
|
||||||
<option value="green">Green</option>
|
<option value="green">Green</option>
|
||||||
<option value="red">Red</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)">
|
<th><%= @w2.name %> <select id="w2-color" onchange="changeW2Color(this)">
|
||||||
<option value="red">Red</option>
|
<option value="red">Red</option>
|
||||||
<option value="green">Green</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>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|||||||
Reference in New Issue
Block a user