mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-03 05:27:25 +00:00
Renamed boutNumber to bout_number to make the field consistent with the rest of the domain and database schema.
This commit is contained in:
@@ -8,7 +8,7 @@ class Boutgen
|
||||
@matches = matches.sort_by{|x|[x.weight_max]}
|
||||
@matches.each_with_index do |m, i|
|
||||
@bout = m.round * 1000 + i
|
||||
m.boutNumber = @bout
|
||||
m.bout_number = @bout
|
||||
end
|
||||
return @matches
|
||||
end
|
||||
|
||||
@@ -17,8 +17,8 @@ class Losernamegen
|
||||
@match1 = matches.select{|m| m.loser1_name == "Winner Pool 1"}.first
|
||||
@match2 = matches.select{|m| m.loser1_name == "Winner Pool 2"}.first
|
||||
@matchChange = matches.select{|m| m.bracket_position == "3/4"}.first
|
||||
@matchChange.loser1_name = "Loser of #{@match1.boutNumber}"
|
||||
@matchChange.loser2_name = "Loser of #{@match2.boutNumber}"
|
||||
@matchChange.loser1_name = "Loser of #{@match1.bout_number}"
|
||||
@matchChange.loser2_name = "Loser of #{@match2.bout_number}"
|
||||
end
|
||||
|
||||
def fourPoolsToQuarterLoser(matches)
|
||||
@@ -29,18 +29,18 @@ class Losernamegen
|
||||
@seventhEighth = matches.select{|m| m.bracket_position == "7/8"}.first
|
||||
@consoSemis.each do |match|
|
||||
if match.bracket_position_number == 1
|
||||
match.loser1_name = "Loser of #{@quarters.select{|m| m.bracket_position_number == 1}.first.boutNumber}"
|
||||
match.loser2_name = "Loser of #{@quarters.select{|m| m.bracket_position_number == 2}.first.boutNumber}"
|
||||
match.loser1_name = "Loser of #{@quarters.select{|m| m.bracket_position_number == 1}.first.bout_number}"
|
||||
match.loser2_name = "Loser of #{@quarters.select{|m| m.bracket_position_number == 2}.first.bout_number}"
|
||||
elsif match.bracket_position_number == 2
|
||||
match.loser1_name = "Loser of #{@quarters.select{|m| m.bracket_position_number == 3}.first.boutNumber}"
|
||||
match.loser2_name = "Loser of #{@quarters.select{|m| m.bracket_position_number == 4}.first.boutNumber}"
|
||||
match.loser1_name = "Loser of #{@quarters.select{|m| m.bracket_position_number == 3}.first.bout_number}"
|
||||
match.loser2_name = "Loser of #{@quarters.select{|m| m.bracket_position_number == 4}.first.bout_number}"
|
||||
end
|
||||
end
|
||||
@thirdFourth.loser1_name = "Loser of #{@semis.select{|m| m.bracket_position_number == 1}.first.boutNumber}"
|
||||
@thirdFourth.loser2_name = "Loser of #{@semis.select{|m| m.bracket_position_number == 2}.first.boutNumber}"
|
||||
@thirdFourth.loser1_name = "Loser of #{@semis.select{|m| m.bracket_position_number == 1}.first.bout_number}"
|
||||
@thirdFourth.loser2_name = "Loser of #{@semis.select{|m| m.bracket_position_number == 2}.first.bout_number}"
|
||||
@consoSemis = matches.select{|m| m.bracket_position == "Conso Semis"}
|
||||
@seventhEighth.loser1_name = "Loser of #{@consoSemis.select{|m| m.bracket_position_number == 1}.first.boutNumber}"
|
||||
@seventhEighth.loser2_name = "Loser of #{@consoSemis.select{|m| m.bracket_position_number == 2}.first.boutNumber}"
|
||||
@seventhEighth.loser1_name = "Loser of #{@consoSemis.select{|m| m.bracket_position_number == 1}.first.bout_number}"
|
||||
@seventhEighth.loser2_name = "Loser of #{@consoSemis.select{|m| m.bracket_position_number == 2}.first.bout_number}"
|
||||
end
|
||||
|
||||
def fourPoolsToSemiLoser(matches)
|
||||
@@ -48,9 +48,9 @@ class Losernamegen
|
||||
@thirdFourth = matches.select{|m| m.bracket_position == "3/4"}.first
|
||||
@consoSemis = matches.select{|m| m.bracket_position == "Conso Semis"}
|
||||
@seventhEighth = matches.select{|m| m.bracket_position == "7/8"}.first
|
||||
@thirdFourth.loser1_name = "Loser of #{@semis.select{|m| m.bracket_position_number == 1}.first.boutNumber}"
|
||||
@thirdFourth.loser2_name = "Loser of #{@semis.select{|m| m.bracket_position_number == 2}.first.boutNumber}"
|
||||
@seventhEighth.loser1_name = "Loser of #{@consoSemis.select{|m| m.bracket_position_number == 1}.first.boutNumber}"
|
||||
@seventhEighth.loser2_name = "Loser of #{@consoSemis.select{|m| m.bracket_position_number == 2}.first.boutNumber}"
|
||||
@thirdFourth.loser1_name = "Loser of #{@semis.select{|m| m.bracket_position_number == 1}.first.bout_number}"
|
||||
@thirdFourth.loser2_name = "Loser of #{@semis.select{|m| m.bracket_position_number == 2}.first.bout_number}"
|
||||
@seventhEighth.loser1_name = "Loser of #{@consoSemis.select{|m| m.bracket_position_number == 1}.first.bout_number}"
|
||||
@seventhEighth.loser2_name = "Loser of #{@consoSemis.select{|m| m.bracket_position_number == 2}.first.bout_number}"
|
||||
end
|
||||
end
|
||||
@@ -27,7 +27,7 @@ class Wrestler < ActiveRecord::Base
|
||||
if @match.blank?
|
||||
return "BYE"
|
||||
else
|
||||
return @match.boutNumber
|
||||
return @match.bout_number
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ li.game{
|
||||
<li class="spacer"> </li>
|
||||
|
||||
<li class="game game-top "><%= match.w1_name %> <span>Score</span></li>
|
||||
<li class="game game-spacer"><%= match.boutNumber %> </li>
|
||||
<li class="game game-spacer"><%= match.bout_number %> </li>
|
||||
<li class="game game-bottom "><%= match.w2_name %><span>Score</span></li>
|
||||
|
||||
<li class="spacer"> </li>
|
||||
@@ -78,7 +78,7 @@ li.game{
|
||||
<li class="spacer"> </li>
|
||||
|
||||
<li class="game game-top "><%= match.w1_name %> <span>Score</span></li>
|
||||
<li class="game game-spacer"><%= match.boutNumber %> </li>
|
||||
<li class="game game-spacer"><%= match.bout_number %> </li>
|
||||
<li class="game game-bottom "><%= match.w2_name %><span>Score</span></li>
|
||||
|
||||
<li class="spacer"> </li>
|
||||
@@ -90,7 +90,7 @@ li.game{
|
||||
<li class="spacer"> </li>
|
||||
|
||||
<li class="game game-top "><%= match.w1_name %> <span>Score</span></li>
|
||||
<li class="game game-spacer"><%= match.boutNumber %> </li>
|
||||
<li class="game game-spacer"><%= match.bout_number %> </li>
|
||||
<li class="game game-bottom "><%= match.w2_name %><span>Score</span></li>
|
||||
|
||||
<li class="spacer"> </li>
|
||||
@@ -115,7 +115,7 @@ li.game{
|
||||
<li class="spacer"> </li>
|
||||
|
||||
<li class="game game-top "><%= match.w1_name %> <span>Score</span></li>
|
||||
<li class="game game-spacer"><%= match.boutNumber %> </li>
|
||||
<li class="game game-spacer"><%= match.bout_number %> </li>
|
||||
<li class="game game-bottom "><%= match.w2_name %><span>Score</span></li>
|
||||
|
||||
<li class="spacer"> </li>
|
||||
@@ -140,7 +140,7 @@ li.game{
|
||||
<li class="spacer"> </li>
|
||||
|
||||
<li class="game game-top "><%= match.w1_name %> <span>Score</span></li>
|
||||
<li class="game game-spacer"><%= match.boutNumber %> </li>
|
||||
<li class="game game-spacer"><%= match.bout_number %> </li>
|
||||
<li class="game game-bottom "><%= match.w2_name %><span>Score</span></li>
|
||||
|
||||
<li class="spacer"> </li>
|
||||
@@ -152,7 +152,7 @@ li.game{
|
||||
<li class="spacer"> </li>
|
||||
|
||||
<li class="game game-top "><%= match.w1_name %> <span>Score</span></li>
|
||||
<li class="game game-spacer"><%= match.boutNumber %> </li>
|
||||
<li class="game game-spacer"><%= match.bout_number %> </li>
|
||||
<li class="game game-bottom "><%= match.w2_name %><span>Score</span></li>
|
||||
|
||||
<li class="spacer"> </li>
|
||||
@@ -177,7 +177,7 @@ li.game{
|
||||
<li class="spacer"> </li>
|
||||
|
||||
<li class="game game-top "><%= match.w1_name %> <span>Score</span></li>
|
||||
<li class="game game-spacer"><%= match.boutNumber %> </li>
|
||||
<li class="game game-spacer"><%= match.bout_number %> </li>
|
||||
<li class="game game-bottom "><%= match.w2_name %><span>Score</span></li>
|
||||
|
||||
<li class="spacer"> </li>
|
||||
|
||||
@@ -66,7 +66,7 @@ li.game{
|
||||
<li class="spacer"> </li>
|
||||
|
||||
<li class="game game-top "><%= match.w1_name %> <span>Score</span></li>
|
||||
<li class="game game-spacer"><%= match.boutNumber %> </li>
|
||||
<li class="game game-spacer"><%= match.bout_number %> </li>
|
||||
<li class="game game-bottom "><%= match.w2_name %><span>Score</span></li>
|
||||
|
||||
<li class="spacer"> </li>
|
||||
@@ -78,7 +78,7 @@ li.game{
|
||||
<li class="spacer"> </li>
|
||||
|
||||
<li class="game game-top "><%= match.w1_name %> <span>Score</span></li>
|
||||
<li class="game game-spacer"><%= match.boutNumber %> </li>
|
||||
<li class="game game-spacer"><%= match.bout_number %> </li>
|
||||
<li class="game game-bottom "><%= match.w2_name %><span>Score</span></li>
|
||||
|
||||
<li class="spacer"> </li>
|
||||
@@ -104,7 +104,7 @@ li.game{
|
||||
<li class="spacer"> </li>
|
||||
|
||||
<li class="game game-top "><%= match.w1_name %> <span>Score</span></li>
|
||||
<li class="game game-spacer"><%= match.boutNumber %> </li>
|
||||
<li class="game game-spacer"><%= match.bout_number %> </li>
|
||||
<li class="game game-bottom "><%= match.w2_name %><span>Score</span></li>
|
||||
|
||||
<li class="spacer"> </li>
|
||||
@@ -131,7 +131,7 @@ li.game{
|
||||
<li class="spacer"> </li>
|
||||
|
||||
<li class="game game-top "><%= match.w1_name %> <span>Score</span></li>
|
||||
<li class="game game-spacer"><%= match.boutNumber %> </li>
|
||||
<li class="game game-spacer"><%= match.bout_number %> </li>
|
||||
<li class="game game-bottom "><%= match.w2_name %><span>Score</span></li>
|
||||
|
||||
<li class="spacer"> </li>
|
||||
@@ -143,7 +143,7 @@ li.game{
|
||||
<li class="spacer"> </li>
|
||||
|
||||
<li class="game game-top "><%= match.w1_name %> <span>Score</span></li>
|
||||
<li class="game game-spacer"><%= match.boutNumber %> </li>
|
||||
<li class="game game-spacer"><%= match.bout_number %> </li>
|
||||
<li class="game game-bottom "><%= match.w2_name %><span>Score</span></li>
|
||||
|
||||
<li class="spacer"> </li>
|
||||
@@ -168,7 +168,7 @@ li.game{
|
||||
<li class="spacer"> </li>
|
||||
|
||||
<li class="game game-top "><%= match.w1_name %> <span>Score</span></li>
|
||||
<li class="game game-spacer"><%= match.boutNumber %> </li>
|
||||
<li class="game game-spacer"><%= match.bout_number %> </li>
|
||||
<li class="game game-bottom "><%= match.w2_name %><span>Score</span></li>
|
||||
|
||||
<li class="spacer"> </li>
|
||||
|
||||
@@ -66,7 +66,7 @@ li.game{
|
||||
<li class="spacer"> </li>
|
||||
|
||||
<li class="game game-top "><%= match.w1_name %> <span>Score</span></li>
|
||||
<li class="game game-spacer"><%= match.boutNumber %> </li>
|
||||
<li class="game game-spacer"><%= match.bout_number %> </li>
|
||||
<li class="game game-bottom "><%= match.w2_name %><span>Score</span></li>
|
||||
|
||||
<li class="spacer"> </li>
|
||||
@@ -90,7 +90,7 @@ li.game{
|
||||
<li class="spacer"> </li>
|
||||
|
||||
<li class="game game-top "><%= match.w1_name %> <span>Score</span></li>
|
||||
<li class="game game-spacer"><%= match.boutNumber %> </li>
|
||||
<li class="game game-spacer"><%= match.bout_number %> </li>
|
||||
<li class="game game-bottom "><%= match.w2_name %><span>Score</span></li>
|
||||
|
||||
<li class="spacer"> </li>
|
||||
|
||||
@@ -66,7 +66,7 @@ li.game{
|
||||
<li class="spacer"> </li>
|
||||
|
||||
<li class="game game-top "><%= match.w1_name %> <span>Score</span></li>
|
||||
<li class="game game-spacer"><%= match.boutNumber %> </li>
|
||||
<li class="game game-spacer"><%= match.bout_number %> </li>
|
||||
<li class="game game-bottom "><%= match.w2_name %><span>Score</span></li>
|
||||
|
||||
<li class="spacer"> </li>
|
||||
@@ -78,7 +78,7 @@ li.game{
|
||||
<li class="spacer"> </li>
|
||||
|
||||
<li class="game game-top "><%= match.w1_name %> <span>Score</span></li>
|
||||
<li class="game game-spacer"><%= match.boutNumber %> </li>
|
||||
<li class="game game-spacer"><%= match.bout_number %> </li>
|
||||
<li class="game game-bottom "><%= match.w2_name %><span>Score</span></li>
|
||||
|
||||
<li class="spacer"> </li>
|
||||
@@ -104,7 +104,7 @@ li.game{
|
||||
<li class="spacer"> </li>
|
||||
|
||||
<li class="game game-top "><%= match.w1_name %> <span>Score</span></li>
|
||||
<li class="game game-spacer"><%= match.boutNumber %> </li>
|
||||
<li class="game game-spacer"><%= match.bout_number %> </li>
|
||||
<li class="game game-bottom "><%= match.w2_name %><span>Score</span></li>
|
||||
|
||||
<li class="spacer"> </li>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<% @matches.each.map do |m| %>
|
||||
<tr>
|
||||
<td>Round <%= m.round %></td>
|
||||
<td><%= m.boutNumber %></td>
|
||||
<td><%= m.bout_number %></td>
|
||||
<td><%= m.weight_max %> lbs</td>
|
||||
<td><%= m.w1_name %> vs. <%= m.w2_name %></td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user