mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
Added winner name for final line of brackets
This commit is contained in:
@@ -44,7 +44,17 @@ class Match < ActiveRecord::Base
|
||||
self.loser2_name
|
||||
end
|
||||
end
|
||||
|
||||
def winnerName
|
||||
if self.finished != 1
|
||||
return ""
|
||||
end
|
||||
if self.winner_id == self.w1
|
||||
return self.w1_name
|
||||
end
|
||||
if self.winner_id == self.w2
|
||||
return self.w2_name
|
||||
end
|
||||
end
|
||||
def weight_max
|
||||
Weight.find(self.weight_id).max
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user