1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-11 16:01:56 +00:00

Re-generating one weight classes matches - NEED TO REFACTOR and NEED TO WRITE TESTS

Code is repeated in the following classes:
GenerateTournamentMatches
PoolToBracketMatchGeneration
PoolToBracketGenerateLoserNames
WipeTournamentMatches
This commit is contained in:
2016-09-09 17:51:00 +00:00
parent a14d750f13
commit bbb745564e
9 changed files with 58 additions and 5 deletions

View File

@@ -0,0 +1,3 @@
<%= link_to "Back to #{@weight.tournament.name}", "/tournaments/#{@weight.tournament.id}", :class=>"btn btn-default" %>
<br><br>
<%= @weight.max %> lbs Matches are being generated. This can take anywhere from 1-5 minutes to finish. It is recommended to delete all delegated school permissions to prevent lineup changes after the tournament has started.

View File

@@ -4,6 +4,9 @@
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}", :class=>"btn btn-default" %>
<% if can? :manage, @tournament %>
| <%= link_to "Edit #{@weight.max} Weight Class", edit_weight_path(@weight), :class=>"btn btn-primary" %>
| <%= form_for(@weight, url: regen_weight_path(@weight.id), :method => "post") do |f| %>
<%= submit_tag "Regenerate Weight Class Matches", :class=>"btn"%>
<% end %>
<% end %>
<br>