diff options
author | AndrewMurrell <amurrel@purdue.edu> | 2014-03-06 21:22:15 -0500 |
---|---|---|
committer | AndrewMurrell <amurrel@purdue.edu> | 2014-03-06 21:22:15 -0500 |
commit | 3f6f212c1d50a0ae953104524ceffe94095307cf (patch) | |
tree | da7766c1868ebea003c5be50572d7ca12ba10d84 /app/controllers | |
parent | e4fe0192a332a324dd207b370252669c88216488 (diff) |
tournament controller to matches redirect
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/tournaments_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/tournaments_controller.rb b/app/controllers/tournaments_controller.rb index 6fc3ad6..3f6de26 100644 --- a/app/controllers/tournaments_controller.rb +++ b/app/controllers/tournaments_controller.rb @@ -11,12 +11,16 @@ class TournamentsController < ApplicationController # GET /tournaments/1 # GET /tournaments/1.json def show + unless @tournament.status + redirect_to tournament_matches_page(@tournament) + end end # GET /tournaments/new def new @games = Game.all @tournament = Tournament.new(game: Game.find_by_id(params[:game])) + @tournament.status = 1 end # GET /tournaments/1/edit |