1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-08 07:22:38 +00:00

Added team abbreviation

This commit is contained in:
2019-01-24 20:16:43 +00:00
parent 0599faa173
commit 6bbb0b2e2c
11 changed files with 94 additions and 59 deletions

View File

@@ -99,6 +99,23 @@ class Match < ActiveRecord::Base
self.loser2_name
end
end
def w1_bracket_name
if self.w1 != nil
return "#{w1_name} (#{wrestler1.school.abbreviation})"
else
""
end
end
def w2_bracket_name
if self.w2 != nil
return "#{w2_name} (#{wrestler2.school.abbreviation})"
else
""
end
end
def winner_name
if self.finished != 1
return ""
@@ -110,6 +127,15 @@ class Match < ActiveRecord::Base
return self.w2_name
end
end
def bracket_winner_name
if winner_name != ""
return "#{winner_name} (#{Wrestler.find(winner_id).school.abbreviation})"
else
""
end
end
def weight_max
self.weight.max
end