summaryrefslogtreecommitdiff
path: root/app/controllers/tournaments_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/tournaments_controller.rb')
-rw-r--r--app/controllers/tournaments_controller.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/tournaments_controller.rb b/app/controllers/tournaments_controller.rb
index 720305f..5c53693 100644
--- a/app/controllers/tournaments_controller.rb
+++ b/app/controllers/tournaments_controller.rb
@@ -14,6 +14,8 @@ class TournamentsController < ApplicationController
# GET /tournaments/new
def new
+ @game_names = Game.all.collect
+ @game = params[:game]
@tournament = Tournament.new
end
@@ -69,6 +71,6 @@ class TournamentsController < ApplicationController
# Never trust parameters from the scary internet, only allow the white list through.
def tournament_params
- params.require(:tournament).permit(:game_id)
+ params.require(:tournament).permit(:game_id, :game)
end
end