mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
Updating calculating team scores as a put
This commit is contained in:
@@ -17,7 +17,7 @@ class TournamentsController < ApplicationController
|
||||
respond_to do |format|
|
||||
if @tournament.calculate_all_team_scores
|
||||
format.html { redirect_to "/tournaments/#{@tournament.id}", notice: 'Team scores are calcuating.' }
|
||||
format.json { render action: 'show', status: :created, location: @tournament }
|
||||
format.json { head :no_content }
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -27,7 +27,7 @@ class TournamentsController < ApplicationController
|
||||
respond_to do |format|
|
||||
if WrestlingdevImporter.new(@tournament,import_text).import
|
||||
format.html { redirect_to "/tournaments/#{@tournament.id}", notice: 'Import is on-going. This will take 1-5 minutes.' }
|
||||
format.json { render action: 'show', status: :created, location: @tournament }
|
||||
format.json { head :no_content }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
<script src="//instant.page/5.1.0" type="module" integrity="sha384-by67kQnR+pyfy8yWP4kPO12fHKRLHZPfEsiSXR8u2IKcTdxD805MGUXBzVPnkLHw"></script>
|
||||
@@ -45,7 +45,7 @@
|
||||
<li><%= link_to "Create Boys High School Weights (106-285)" , "/tournaments/#{@tournament.id}/create_custom_weights?customValue=#{Weight::HS_WEIGHT_CLASSES}",data: { confirm: 'Are you sure? This will delete all current weights.' } %></li>
|
||||
<li><%= link_to "Create Girls High School Weights (101-235)" , "/tournaments/#{@tournament.id}/create_custom_weights?customValue=#{Weight::HS_GIRLS_WEIGHT_CLASSES}",data: { confirm: 'Are you sure? This will delete all current weights.' } %></li>
|
||||
<li><strong>Tournament Actions</strong></li>
|
||||
<li><%= link_to "Calculate Team Scores" , "/tournaments/#{@tournament.id}/calculate_team_scores", method: :post %></li>
|
||||
<li><%= link_to "Calculate Team Scores" , "/tournaments/#{@tournament.id}/calculate_team_scores", :method => :put %></li>
|
||||
<li><%= link_to "Generate Brackets" , "/tournaments/#{@tournament.id}/generate_matches", data: { confirm: 'Are you sure? This will delete all current matches.' } %></li>
|
||||
<li><%= link_to "Export Data" , "/tournaments/#{@tournament.id}/export?print=true", target: :_blank %></li>
|
||||
</ul>
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
<%= csrf_meta_tags %>
|
||||
<%= render 'layouts/cdn' %>
|
||||
<%= render 'layouts/shim' %>
|
||||
<%= render 'layouts/instantpage' %>
|
||||
</head>
|
||||
<body style="padding-top: 70px;">
|
||||
<div class="container">
|
||||
|
||||
@@ -54,7 +54,7 @@ Wrestling::Application.routes.draw do
|
||||
get 'tournaments/:id/export' => "tournaments#export"
|
||||
post "/tournaments/:id/import" => "tournaments#import", :as => :import
|
||||
get "/tournaments/:id/brackets" => "tournaments#show"
|
||||
post "/tournaments/:id/calculate_team_scores" => "tournaments#calculate_team_scores"
|
||||
put "/tournaments/:id/calculate_team_scores", :to => "tournaments#calculate_team_scores"
|
||||
|
||||
post 'weights/:id/re_gen' => 'weights#re_gen', :as => :regen_weight
|
||||
post "/wrestlers/update_pool" => "wrestlers#update_pool"
|
||||
|
||||
Reference in New Issue
Block a user