summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authortkimia <tkimia@purdue.edu>2014-04-17 19:01:17 -0400
committertkimia <tkimia@purdue.edu>2014-04-17 19:01:17 -0400
commite160216d66dd683af07806d48051b5c5dda069f6 (patch)
tree2a6530def1d8f8ca6625ca651aae8e6b9e4c9939 /app
parent9ab9a92e4434a71a3be315e6a33b736ca3c00107 (diff)
parent59b4433356210e3296e81403a6e97f4ba28f7097 (diff)
Merge branch 'master' of https://github.com/LukeShu/leaguer
Diffstat (limited to 'app')
-rw-r--r--app/controllers/tournaments_controller.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/tournaments_controller.rb b/app/controllers/tournaments_controller.rb
index f572248..bb1d222 100644
--- a/app/controllers/tournaments_controller.rb
+++ b/app/controllers/tournaments_controller.rb
@@ -127,6 +127,11 @@ class TournamentsController < ApplicationController
private
# Use callbacks to share common setup or constraints between actions.
def set_tournament
+ if @tournament.nil?
+ respond_to do |format|
+ format.html { redirect_to @tournament, notice: 'That tournament no longer exists.' }
+ end
+ end
@tournament = Tournament.find(params[:id])
end