1
0
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:
2021-12-21 02:04:55 +00:00
parent 1c8e3af5f4
commit 194fbca978
5 changed files with 4 additions and 6 deletions

View File

@@ -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