From fc3581e33e26fe58d5df26cc6f0c6532bc0717d7 Mon Sep 17 00:00:00 2001 From: jcwimer Date: Wed, 23 Dec 2015 16:31:37 +0000 Subject: [PATCH] Fixed wrestler touch in match after_save callback --- app/models/match.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/models/match.rb b/app/models/match.rb index 4bf1158..d31d4c5 100644 --- a/app/models/match.rb +++ b/app/models/match.rb @@ -6,8 +6,10 @@ class Match < ActiveRecord::Base after_save do if self.finished == 1 && self.winner_id != nil - wrestler1.touch - wrestler2.touch + if self.w1 && self.w2 + wrestler1.touch + wrestler2.touch + end advance_wrestlers calcSchoolPoints end