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

Put win type on bracket and made bracket text smaller

This commit is contained in:
2019-02-01 15:36:37 +00:00
parent 2b92bdaf66
commit d0cf5301e2
3 changed files with 11 additions and 8 deletions

View File

@@ -63,15 +63,16 @@ class Match < ActiveRecord::Base
end
if self.finished == 1
if self.win_type == "Default"
return "Def"
return "(Def)"
elsif self.win_type == "Injury Default"
return "Inj"
return "(Inj)"
elsif self.win_type == "DQ"
return "DQ"
return "(DQ)"
elsif self.win_type == "Forfeit"
return "For"
return "(For)"
else
return "(#{self.score})"
win_type_abbreviation = "#{self.win_type.chars.to_a[0..2].join('')}"
return "(#{win_type_abbreviation} #{self.score})"
end
end
end