1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-27 08:56:37 +00:00

Refactored names of methods and some db column

This commit is contained in:
2018-11-13 14:14:48 +00:00
parent 93be525832
commit d67a8f2b42
44 changed files with 350 additions and 350 deletions

View File

@@ -5,7 +5,7 @@
<li>&nbsp;</li>
<li class="game game-top "><%= match.w1_name %> <span></span></li>
<li><%= match.bout_number %> <%= match.bracketScore %>&nbsp;</li>
<li><%= match.bout_number %> <%= match.bracket_score_string %>&nbsp;</li>
<li class="game game-bottom "><%= match.w2_name %><span></span></li>
<li>&nbsp;</li>
@@ -17,7 +17,7 @@
<li>&nbsp;</li>
<li class="game game-top "><%= match.w1_name %> <span></span></li>
<li><%= match.bout_number %> <%= match.bracketScore %>&nbsp;</li>
<li><%= match.bout_number %> <%= match.bracket_score_string %>&nbsp;</li>
<li class="game game-bottom "><%= match.w2_name %><span></span></li>
<li>&nbsp;</li>
@@ -28,7 +28,7 @@
<li>&nbsp;</li>
<li class="game game-top "><%= match.w1_name %> <span></span></li>
<li><%= match.bout_number %> <%= match.bracketScore %>&nbsp;</li>
<li><%= match.bout_number %> <%= match.bracket_score_string %>&nbsp;</li>
<li class="game game-bottom "><%= match.w2_name %><span></span></li>
<li>&nbsp;</li>
@@ -37,7 +37,7 @@
<ul class="round round-4">
<li>&nbsp;</li>
<li class="bracket-winner"><%= match.winnerName %> <span></span></li>
<li class="bracket-winner"><%= match.winner_name %> <span></span></li>
1st
<li>&nbsp;</li>
@@ -51,7 +51,7 @@
<li>&nbsp;</li>
<li class="game game-top "><%= match.w1_name %> <span></span></li>
<li><%= match.bout_number %> <%= match.bracketScore %>&nbsp;</li>
<li><%= match.bout_number %> <%= match.bracket_score_string %>&nbsp;</li>
<li class="game game-bottom "><%= match.w2_name %><span></span></li>
<li>&nbsp;</li>
@@ -60,7 +60,7 @@
<ul class="round round-2">
<li>&nbsp;</li>
<li class="bracket-winner"> <%= match.winnerName %><span></span></li>
<li class="bracket-winner"> <%= match.winner_name %><span></span></li>
3rd
<li>&nbsp;</li>
@@ -74,7 +74,7 @@
<li>&nbsp;</li>
<li class="game game-top "><%= match.w1_name %> <span></span></li>
<li><%= match.bout_number %> <%= match.bracketScore %>&nbsp;</li>
<li><%= match.bout_number %> <%= match.bracket_score_string %>&nbsp;</li>
<li class="game game-bottom "><%= match.w2_name %><span></span></li>
<li>&nbsp;</li>
@@ -86,7 +86,7 @@
<li>&nbsp;</li>
<li class="game game-top "><%= match.w1_name %> <span></span></li>
<li><%= match.bout_number %> <%= match.bracketScore %>&nbsp;</li>
<li><%= match.bout_number %> <%= match.bracket_score_string %>&nbsp;</li>
<li class="game game-bottom "><%= match.w2_name %><span></span></li>
<li>&nbsp;</li>
@@ -95,7 +95,7 @@
<ul class="round round-3">
<li>&nbsp;</li>
<li class="bracket-winner"> <%= match.winnerName %><span></span></li>
<li class="bracket-winner"> <%= match.winner_name %><span></span></li>
5th
<li>&nbsp;</li>
@@ -109,7 +109,7 @@
<li>&nbsp;</li>
<li class="game game-top "><%= match.w1_name %> <span></span></li>
<li><%= match.bout_number %> <%= match.bracketScore %>&nbsp;</li>
<li><%= match.bout_number %> <%= match.bracket_score_string %>&nbsp;</li>
<li class="game game-bottom "><%= match.w2_name %><span></span></li>
<li>&nbsp;</li>
@@ -118,7 +118,7 @@
<ul class="round round-2">
<li>&nbsp;</li>
<li class="bracket-winner"><%= match.winnerName %> <span></span></li>
<li class="bracket-winner"><%= match.winner_name %> <span></span></li>
7th
<li>&nbsp;</li>

View File

@@ -5,7 +5,7 @@
<li>&nbsp;</li>
<li class="game game-top "><%= match.w1_name %> <span></span></li>
<li><%= match.bout_number %> <%= match.bracketScore %>&nbsp;</li>
<li><%= match.bout_number %> <%= match.bracket_score_string %>&nbsp;</li>
<li class="game game-bottom "><%= match.w2_name %><span></span></li>
<li>&nbsp;</li>
@@ -17,7 +17,7 @@
<li>&nbsp;</li>
<li class="game game-top "><%= match.w1_name %> <span></span></li>
<li><%= match.bout_number %> <%= match.bracketScore %>&nbsp;</li>
<li><%= match.bout_number %> <%= match.bracket_score_string %>&nbsp;</li>
<li class="game game-bottom "><%= match.w2_name %><span></span></li>
<li>&nbsp;</li>
@@ -26,7 +26,7 @@
<ul class="round round-3">
<li>&nbsp;</li>
<li class="bracket-winner"><%= match.winnerName %><span></span></li>
<li class="bracket-winner"><%= match.winner_name %><span></span></li>
1st
<li>&nbsp;</li>
@@ -41,7 +41,7 @@
<li>&nbsp;</li>
<li class="game game-top "><%= match.w1_name %> <span></span></li>
<li><%= match.bout_number %> <%= match.bracketScore %>&nbsp;</li>
<li><%= match.bout_number %> <%= match.bracket_score_string %>&nbsp;</li>
<li class="game game-bottom "><%= match.w2_name %><span></span></li>
<li>&nbsp;</li>
@@ -50,7 +50,7 @@
<ul class="round round-2">
<li>&nbsp;</li>
<li class="bracket-winner"><%= match.winnerName %><span></span></li>
<li class="bracket-winner"><%= match.winner_name %><span></span></li>
3rd
<li>&nbsp;</li>
@@ -66,7 +66,7 @@
<li>&nbsp;</li>
<li class="game game-top "><%= match.w1_name %> <span></span></li>
<li><%= match.bout_number %> <%= match.bracketScore %>&nbsp;</li>
<li><%= match.bout_number %> <%= match.bracket_score_string %>&nbsp;</li>
<li class="game game-bottom "><%= match.w2_name %><span></span></li>
<li>&nbsp;</li>
@@ -78,7 +78,7 @@
<li>&nbsp;</li>
<li class="game game-top "><%= match.w1_name %> <span></span></li>
<li><%= match.bout_number %> <%= match.bracketScore %>&nbsp;</li>
<li><%= match.bout_number %> <%= match.bracket_score_string %>&nbsp;</li>
<li class="game game-bottom "><%= match.w2_name %><span></span></li>
<li>&nbsp;</li>
@@ -87,7 +87,7 @@
<ul class="round round-3">
<li>&nbsp;</li>
<li class="bracket-winner"><%= match.winnerName %><span></span></li>
<li class="bracket-winner"><%= match.winner_name %><span></span></li>
5th
<li>&nbsp;</li>
@@ -101,7 +101,7 @@
<li>&nbsp;</li>
<li class="game game-top "><%= match.w1_name %> <span></span></li>
<li><%= match.bout_number %> <%= match.bracketScore %>&nbsp;</li>
<li><%= match.bout_number %> <%= match.bracket_score_string %>&nbsp;</li>
<li class="game game-bottom "><%= match.w2_name %><span></span></li>
<li>&nbsp;</li>
@@ -110,7 +110,7 @@
<ul class="round round-2">
<li>&nbsp;</li>
<li class="bracket-winner"><%= match.winnerName %><span></span></li>
<li class="bracket-winner"><%= match.winner_name %><span></span></li>
7th
<li>&nbsp;</li>

View File

@@ -1,8 +1,8 @@
<h5>Results</h5>
<br>
<ol>
<li><%= @weight.poolOrder(1).first.name %></li>
<li><%= @weight.poolOrder(1).second.name %></li>
<li><%= @weight.poolOrder(1).third.name %></li>
<li><%= @weight.poolOrder(1).fourth.name %></li>
<li><%= @weight.pool_placement_order(1).first.name %></li>
<li><%= @weight.pool_placement_order(1).second.name %></li>
<li><%= @weight.pool_placement_order(1).third.name %></li>
<li><%= @weight.pool_placement_order(1).fourth.name %></li>
</ol>

View File

@@ -21,7 +21,7 @@
<% @round = 1 %>
<% until @matches.select{|m| m.round == @round}.blank? %>
<% if @round <= @pools %>
<td><%= w.boutByRound(@round) %><br><%= w.resultByBout(w.boutByRound(@round)) %></td>
<td><%= w.bout_by_round(@round) %><br><%= w.result_by_bout(w.bout_by_round(@round)) %></td>
<% end %>
<% @round = @round + 1 %>
<% end %>

View File

@@ -5,7 +5,7 @@
<li>&nbsp;</li>
<li class="game game-top "><%= match.w1_name %> <span></span></li>
<li><%= match.bout_number %> <%= match.bracketScore %>&nbsp;</li>
<li><%= match.bout_number %> <%= match.bracket_score_string %>&nbsp;</li>
<li class="game game-bottom "><%= match.w2_name %><span></span></li>
<li>&nbsp;</li>
@@ -14,7 +14,7 @@
<ul class="round round-2">
<li>&nbsp;</li>
<li class="bracket-winner"><%= match.winnerName %><span></span></li>
<li class="bracket-winner"><%= match.winner_name %><span></span></li>
1st
<li>&nbsp;</li>
@@ -28,7 +28,7 @@
<li>&nbsp;</li>
<li class="game game-top "><%= match.w1_name %> <span></span></li>
<li><%= match.bout_number %> <%= match.bracketScore %>&nbsp;</li>
<li><%= match.bout_number %> <%= match.bracket_score_string %>&nbsp;</li>
<li class="game game-bottom "><%= match.w2_name %><span></span></li>
<li>&nbsp;</li>
@@ -37,7 +37,7 @@
<ul class="round round-2">
<li>&nbsp;</li>
<li class="bracket-winner"><%= match.winnerName %> <span></span></li>
<li class="bracket-winner"><%= match.winner_name %> <span></span></li>
3rd
<li>&nbsp;</li>

View File

@@ -5,7 +5,7 @@
<li>&nbsp;</li>
<li class="game game-top "><%= match.w1_name %> <span></span></li>
<li><%= match.bout_number %> <%= match.bracketScore %>&nbsp;</li>
<li><%= match.bout_number %> <%= match.bracket_score_string %>&nbsp;</li>
<li class="game game-bottom "><%= match.w2_name %><span></span></li>
<li>&nbsp;</li>
@@ -17,7 +17,7 @@
<li>&nbsp;</li>
<li class="game game-top "><%= match.w1_name %> <span></span></li>
<li><%= match.bout_number %> <%= match.bracketScore %>&nbsp;</li>
<li><%= match.bout_number %> <%= match.bracket_score_string %>&nbsp;</li>
<li class="game game-bottom "><%= match.w2_name %><span></span></li>
<li>&nbsp;</li>
@@ -26,7 +26,7 @@
<ul class="round round-3">
<li>&nbsp;</li>
<li class="bracket-winner"><%= match.winnerName %><span></span></li>
<li class="bracket-winner"><%= match.winner_name %><span></span></li>
1st
<li>&nbsp;</li>
@@ -41,7 +41,7 @@
<li>&nbsp;</li>
<li class="game game-top "><%= match.w1_name %> <span></span></li>
<li><%= match.bout_number %> <%= match.bracketScore %>&nbsp;</li>
<li><%= match.bout_number %> <%= match.bracket_score_string %>&nbsp;</li>
<li class="game game-bottom "><%= match.w2_name %><span></span></li>
<li>&nbsp;</li>
@@ -50,7 +50,7 @@
<ul class="round round-2">
<li>&nbsp;</li>
<li class="bracket-winner"><%= match.winnerName %><span></span></li>
<li class="bracket-winner"><%= match.winner_name %><span></span></li>
3rd
<li>&nbsp;</li>

View File

@@ -74,7 +74,7 @@ li:first-child,li:last-child {
<% @weight = w %>
<% @matches = @tournament.matches.select{|m| m.weight_id == @weight.id} %>
<% @wrestlers = Wrestler.where(weight_id: @weight.id) %>
<% @pools = w.poolRounds(@matches) %>
<% @pools = w.pool_rounds(@matches) %>
<%= render 'pool' %>
</td>

View File

@@ -65,7 +65,7 @@ li:first-child,li:last-child {
<td valign="top" style="padding: 10px;">
<% @matches = @tournament.matches.select{|m| m.weight_id == @weight.id} %>
<% @wrestlers = Wrestler.where(weight_id: @weight.id) %>
<% @pools = @weight.poolRounds(@matches) %>
<% @pools = @weight.pool_rounds(@matches) %>
<%= render 'pool' %>
</td>

View File

@@ -1,3 +1,3 @@
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}", :class=>"btn btn-default" %>
<br><br>
<%= @tournament.tournamentMatchGenerationError %>
<%= @tournament.match_generation_error %>

View File

@@ -17,7 +17,7 @@
<% @schools.each do |school| %>
<tr>
<td><%= school.name %></td>
<td><%= school.pageScore %></td>
<td><%= school.page_score_string %></td>
</tr>
<% end %>
</tbody>

View File

@@ -29,10 +29,10 @@
<% @mats.each.map do |m| %>
<tr>
<td><%= m.name %></td>
<td><% if m.unfinishedMatches.first %><strong><%=m.unfinishedMatches.first.bout_number%></strong> - <%= m.unfinishedMatches.first.weight_max %> lbs<br><%= m.unfinishedMatches.first.w1_name %> vs. <%= m.unfinishedMatches.first.w2_name %><% end %></td>
<td><% if m.unfinishedMatches.second %><strong><%=m.unfinishedMatches.second.bout_number%></strong> - <%= m.unfinishedMatches.second.weight_max %> lbs<br><%= m.unfinishedMatches.second.w1_name %> vs. <%= m.unfinishedMatches.second.w2_name %><% end %></td>
<td><% if m.unfinishedMatches.third %><strong><%=m.unfinishedMatches.third.bout_number%></strong> - <%= m.unfinishedMatches.third.weight_max %> lbs<br><%= m.unfinishedMatches.third.w1_name %> vs. <%= m.unfinishedMatches.third.w2_name %><% end %></td>
<td><% if m.unfinishedMatches.fourth %><strong><%=m.unfinishedMatches.fourth.bout_number%></strong> - <%= m.unfinishedMatches.fourth.weight_max %> lbs<br><%= m.unfinishedMatches.fourth.w1_name %> vs. <%= m.unfinishedMatches.fourth.w2_name %><% end %></td>
<td><% if m.unfinished_matches.first %><strong><%=m.unfinished_matches.first.bout_number%></strong> - <%= m.unfinished_matches.first.weight_max %> lbs<br><%= m.unfinished_matches.first.w1_name %> vs. <%= m.unfinished_matches.first.w2_name %><% end %></td>
<td><% if m.unfinished_matches.second %><strong><%=m.unfinished_matches.second.bout_number%></strong> - <%= m.unfinished_matches.second.weight_max %> lbs<br><%= m.unfinished_matches.second.w1_name %> vs. <%= m.unfinished_matches.second.w2_name %><% end %></td>
<td><% if m.unfinished_matches.third %><strong><%=m.unfinished_matches.third.bout_number%></strong> - <%= m.unfinished_matches.third.weight_max %> lbs<br><%= m.unfinished_matches.third.w1_name %> vs. <%= m.unfinished_matches.third.w2_name %><% end %></td>
<td><% if m.unfinished_matches.fourth %><strong><%=m.unfinished_matches.fourth.bout_number%></strong> - <%= m.unfinished_matches.fourth.weight_max %> lbs<br><%= m.unfinished_matches.fourth.w1_name %> vs. <%= m.unfinished_matches.fourth.w2_name %><% end %></td>
</tr>
<% end %>
</tbody>