From 1288b00d612d5969bfdde5b572cb7b6004b0cb66 Mon Sep 17 00:00:00 2001 From: guntasgrewal Date: Mon, 28 Apr 2014 19:47:48 -0400 Subject: Fixed multiple redirection error. --- app/controllers/matches_controller.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/controllers/matches_controller.rb') 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 -- cgit v1.2.3