diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-03-06 22:26:37 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-03-06 22:26:37 -0500 |
commit | 70bae69d731afc5300ffa5b176732ebe27d0810f (patch) | |
tree | a9333f5bd536af96a3703cbfb0ada12c175ec945 | |
parent | 5f2247dd1e701a91fb0359bf7265bdadd5486a60 (diff) |
add self as a host to a tourney upon creation
-rw-r--r-- | app/controllers/tournaments_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/tournaments_controller.rb b/app/controllers/tournaments_controller.rb index 74a1f56..1e26584 100644 --- a/app/controllers/tournaments_controller.rb +++ b/app/controllers/tournaments_controller.rb @@ -31,9 +31,9 @@ class TournamentsController < ApplicationController # POST /tournaments.json def create @tournament = Tournament.new(tournament_params) - respond_to do |format| if @tournament.save + @tournament.hosts.push(current_user) format.html { redirect_to @tournament, notice: 'Tournament was successfully created.' } format.json { render action: 'show', status: :created, location: @tournament } else |