mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-10 23:53:06 +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:
3
app/views/weights/re_gen.html.erb
Normal file
3
app/views/weights/re_gen.html.erb
Normal 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.
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user