diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/matches_controller.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/matches_controller.rb b/app/controllers/matches_controller.rb index 5745ac9..81ffcd8 100644 --- a/app/controllers/matches_controller.rb +++ b/app/controllers/matches_controller.rb @@ -44,7 +44,7 @@ class MatchesController < ApplicationController end when 2 # Started, waiting to finish - @match.handle_sampling(params) + @match.handle_sampling(@current_user, params) # The @match.status will be updated by Statistic's after_save hook respond_to do |format| format.html { redirect_to tournament_match_path(@tournament, @match), notice: 'Match has finished.' } @@ -69,8 +69,9 @@ class MatchesController < ApplicationController end return end + else + redirect_to tournament_match_path(@tournament, @match) end - redirect_to tournament_match_path(@tournament, @match) end private |