mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-10 07:48:29 +00:00
Still moving logic out of the models
This commit is contained in:
@@ -32,9 +32,7 @@ class Match < ActiveRecord::Base
|
||||
wrestler2.school.calcScore
|
||||
end
|
||||
end
|
||||
if Rails.env.production?
|
||||
handle_asynchronously :calcSchoolPoints
|
||||
end
|
||||
|
||||
|
||||
def mat_assigned
|
||||
if self.mat
|
||||
@@ -57,15 +55,11 @@ class Match < ActiveRecord::Base
|
||||
|
||||
def advance_wrestlers
|
||||
if self.w1 && self.w2
|
||||
@w1 = wrestler1
|
||||
@w2 = wrestler2
|
||||
@w1.advanceInBracket(self)
|
||||
@w2.advanceInBracket(self)
|
||||
AdvanceWrestler.new(wrestler1).advance
|
||||
AdvanceWrestler.new(wrestler2).advance
|
||||
end
|
||||
end
|
||||
if Rails.env.production?
|
||||
handle_asynchronously :advance_wrestlers
|
||||
end
|
||||
|
||||
|
||||
def bracketScore
|
||||
if self.finished != 1
|
||||
|
||||
Reference in New Issue
Block a user