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

5 Commits

4 changed files with 8 additions and 8 deletions

View File

@@ -96,7 +96,7 @@ class Match < ActiveRecord::Base
elsif self.win_type == "DQ"
return "(DQ)"
elsif self.win_type == "Forfeit"
return "(For)"
return "(FF)"
else
win_type_abbreviation = "#{self.win_type.chars.to_a[0..2].join('')}"
return "(#{win_type_abbreviation} #{self.score})"

View File

@@ -145,17 +145,17 @@ class Tournament < ActiveRecord::Base
end
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
double_elim_error = double_elim_number_of_wrestlers
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|
errorString = errorString + "#{w.max} "
error_string = error_string + "#{w.max} "
end
return errorString
return error_string
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
return error_string + double_elim_error
else

View File

@@ -15,7 +15,7 @@
<% cache ["#{@tournament.id}_all_brackets", @tournament] do %>
<div id="exportable" >
<%= render :file => 'tournaments/team_scores' %>
<%= render :template => 'tournaments/team_scores' %>
<% @tournament.weights.sort_by{|w| w.max}.each do |weight| %>
<table class='pagebreak'>
<tr>

View File

@@ -24,7 +24,7 @@
<tr>
<td><%= match.bout_number %></td>
<td><%= match.bracket_position %></td>
<td><%= match.w1_bracket_name %> vs <%= match.w2_bracket_name %></td>
<td><%= match.w1_bracket_name.html_safe %> vs <%= match.w2_bracket_name.html_safe %></td>
<td><%= match.finished %></td>
<td><%= link_to 'Show', match, :class=>"btn btn-default btn-sm" %>
<%= link_to 'Edit Wrestlers', edit_match_path(match), :class=>"btn btn-primary btn-sm" %>