diff options
author | guntasgrewal <guntasgrewal@gmail.com> | 2014-04-28 19:47:48 -0400 |
---|---|---|
committer | guntasgrewal <guntasgrewal@gmail.com> | 2014-04-28 19:47:48 -0400 |
commit | 1288b00d612d5969bfdde5b572cb7b6004b0cb66 (patch) | |
tree | 8248b1f8bbf7fc462939b711f3dab2e875535eae /app/controllers/matches_controller.rb | |
parent | c082d76825cfc5d42a4eb285c88afa5dd3bd9fe5 (diff) |
Fixed multiple redirection error.
Diffstat (limited to 'app/controllers/matches_controller.rb')
-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 |