mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-06 22:44:14 +00:00
Fixed error_string bug in match generations
This commit is contained in:
@@ -145,17 +145,17 @@ class Tournament < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def match_generation_error
|
def match_generation_error
|
||||||
errorString = "There is a tournament error."
|
error_string = "There is a tournament error."
|
||||||
modified_sixteen_man_error = modified_sixteen_man_number_of_wrestlers
|
modified_sixteen_man_error = modified_sixteen_man_number_of_wrestlers
|
||||||
double_elim_error = double_elim_number_of_wrestlers
|
double_elim_error = double_elim_number_of_wrestlers
|
||||||
if pool_to_bracket_weights_with_too_many_wrestlers != nil
|
if pool_to_bracket_weights_with_too_many_wrestlers != nil
|
||||||
errorString = errorString + " The following weights have too many wrestlers "
|
error_string = error_string + " The following weights have too many wrestlers "
|
||||||
pool_to_bracket_weights_with_too_many_wrestlers.each do |w|
|
pool_to_bracket_weights_with_too_many_wrestlers.each do |w|
|
||||||
errorString = errorString + "#{w.max} "
|
error_string = error_string + "#{w.max} "
|
||||||
end
|
end
|
||||||
return errorString
|
return error_string
|
||||||
elsif modified_sixteen_man_error.length > 0
|
elsif modified_sixteen_man_error.length > 0
|
||||||
return errorString + modified_sixteen_man_error
|
return error_string + modified_sixteen_man_error
|
||||||
elsif double_elim_error.length > 0
|
elsif double_elim_error.length > 0
|
||||||
return error_string + double_elim_error
|
return error_string + double_elim_error
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user