From e2966c0456d143620598d56265fe35a5f4d394c5 Mon Sep 17 00:00:00 2001 From: jcwimer Date: Wed, 16 Dec 2015 12:51:32 +0000 Subject: [PATCH] Fixed win displays for brackets --- app/models/match.rb | 12 +++++++++++- app/models/wrestler.rb | 4 ++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/app/models/match.rb b/app/models/match.rb index 1f99585..08a79db 100644 --- a/app/models/match.rb +++ b/app/models/match.rb @@ -43,7 +43,17 @@ class Match < ActiveRecord::Base return "" end if self.finished == 1 - return "(#{self.score})" + if self.win_type == "Default" + return "Def" + elsif self.win_type == "Injury Default" + return "Inj" + elsif self.win_type == "DQ" + return "DQ" + elsif self.win_type == "Forfeit" + return "For" + else + return "(#{self.score})" + end end end diff --git a/app/models/wrestler.rb b/app/models/wrestler.rb index e1e2403..b822d92 100644 --- a/app/models/wrestler.rb +++ b/app/models/wrestler.rb @@ -82,10 +82,10 @@ class Wrestler < ActiveRecord::Base return "" end if @match.first.winner_id == self.id - return "W #{@match.first.score}" + return "W #{@match.first.bracketScore}" end if @match.first.winner_id != self.id - return "L #{@match.first.score}" + return "L #{@match.first.bracketScore}" end end