From 1f08d1a8238f1ff2548072cff4db2f4f154dd441 Mon Sep 17 00:00:00 2001 From: jcwimer Date: Thu, 4 Feb 2016 15:32:38 +0000 Subject: [PATCH] Assign next mat match before submitting delayed job --- app/models/match.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/match.rb b/app/models/match.rb index b7059bd..962f993 100644 --- a/app/models/match.rb +++ b/app/models/match.rb @@ -12,6 +12,9 @@ class Match < ActiveRecord::Base wrestler1.touch wrestler2.touch end + if self.mat + self.mat.assignNextMatch + end advance_wrestlers calcSchoolPoints end @@ -54,9 +57,6 @@ class Match < ActiveRecord::Base @w2 = wrestler2 @w1.advanceInBracket(self) @w2.advanceInBracket(self) - if self.mat - self.mat.assignNextMatch - end end end if Rails.env.production?