mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-07 23:17:25 +00:00
Assign next mat match before submitting delayed job
This commit is contained in:
@@ -12,6 +12,9 @@ class Match < ActiveRecord::Base
|
|||||||
wrestler1.touch
|
wrestler1.touch
|
||||||
wrestler2.touch
|
wrestler2.touch
|
||||||
end
|
end
|
||||||
|
if self.mat
|
||||||
|
self.mat.assignNextMatch
|
||||||
|
end
|
||||||
advance_wrestlers
|
advance_wrestlers
|
||||||
calcSchoolPoints
|
calcSchoolPoints
|
||||||
end
|
end
|
||||||
@@ -54,9 +57,6 @@ class Match < ActiveRecord::Base
|
|||||||
@w2 = wrestler2
|
@w2 = wrestler2
|
||||||
@w1.advanceInBracket(self)
|
@w1.advanceInBracket(self)
|
||||||
@w2.advanceInBracket(self)
|
@w2.advanceInBracket(self)
|
||||||
if self.mat
|
|
||||||
self.mat.assignNextMatch
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if Rails.env.production?
|
if Rails.env.production?
|
||||||
|
|||||||
Reference in New Issue
Block a user