diff --git a/app/controllers/tournaments_controller.rb b/app/controllers/tournaments_controller.rb index fc850f2..ec15f69 100644 --- a/app/controllers/tournaments_controller.rb +++ b/app/controllers/tournaments_controller.rb @@ -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 diff --git a/app/views/layouts/_instantpage.html.erb b/app/views/layouts/_instantpage.html.erb deleted file mode 100644 index 302ccdb..0000000 --- a/app/views/layouts/_instantpage.html.erb +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/app/views/layouts/_tournament-navbar.html.erb b/app/views/layouts/_tournament-navbar.html.erb index 25ba253..8d16465 100644 --- a/app/views/layouts/_tournament-navbar.html.erb +++ b/app/views/layouts/_tournament-navbar.html.erb @@ -45,7 +45,7 @@
  • <%= 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.' } %>
  • <%= 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.' } %>
  • Tournament Actions
  • -
  • <%= link_to "Calculate Team Scores" , "/tournaments/#{@tournament.id}/calculate_team_scores", method: :post %>
  • +
  • <%= link_to "Calculate Team Scores" , "/tournaments/#{@tournament.id}/calculate_team_scores", :method => :put %>
  • <%= link_to "Generate Brackets" , "/tournaments/#{@tournament.id}/generate_matches", data: { confirm: 'Are you sure? This will delete all current matches.' } %>
  • <%= link_to "Export Data" , "/tournaments/#{@tournament.id}/export?print=true", target: :_blank %>
  • diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 758d279..a7cc6de 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -22,7 +22,6 @@ <%= csrf_meta_tags %> <%= render 'layouts/cdn' %> <%= render 'layouts/shim' %> - <%= render 'layouts/instantpage' %>
    diff --git a/config/routes.rb b/config/routes.rb index 330fa12..0b2fcc4 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -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"