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

Assign next mat match before submitting delayed job

This commit is contained in:
2016-02-04 15:32:38 +00:00
parent 57c4191562
commit 1f08d1a823

View File

@@ -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?