mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-19 05:43:17 +00:00
Fixed creating a teampointadjust with a wrestler
This commit is contained in:
@@ -14,7 +14,7 @@ class Teampointadjust < ActiveRecord::Base
|
|||||||
#Team score needs calculated
|
#Team score needs calculated
|
||||||
if self.wrestler_id != nil
|
if self.wrestler_id != nil
|
||||||
#In case this affects pool order
|
#In case this affects pool order
|
||||||
AdvanceWrestler.new(self.wrestler).advance
|
AdvanceWrestler.new(self.wrestler,self.wrestler.last_match).advance
|
||||||
self.wrestler.school.calculate_score
|
self.wrestler.school.calculate_score
|
||||||
elsif self.school_id != nil
|
elsif self.school_id != nil
|
||||||
self.school.calculate_score
|
self.school.calculate_score
|
||||||
|
|||||||
@@ -14,9 +14,11 @@ class AdvanceWrestler
|
|||||||
end
|
end
|
||||||
|
|
||||||
def advance_raw
|
def advance_raw
|
||||||
|
if @last_match && @last_match.finished?
|
||||||
pool_to_bracket_advancement if @tournament.tournament_type == "Pool to bracket"
|
pool_to_bracket_advancement if @tournament.tournament_type == "Pool to bracket"
|
||||||
DoubleEliminationAdvance.new(@wrestler, @last_match).bracket_advancement if @tournament.tournament_type.include? "Modified 16 Man Double Elimination" or
|
DoubleEliminationAdvance.new(@wrestler, @last_match).bracket_advancement if @tournament.tournament_type.include? "Modified 16 Man Double Elimination" or
|
||||||
@tournament.tournament_type.include? "Regular Double Elimination"
|
@tournament.tournament_type.include? "Regular Double Elimination"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def pool_to_bracket_advancement
|
def pool_to_bracket_advancement
|
||||||
|
|||||||
Reference in New Issue
Block a user