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.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/tournaments_controller.rb b/app/controllers/tournaments_controller.rb
index d454edc..60f8789 100644
--- a/app/controllers/tournaments_controller.rb
+++ b/app/controllers/tournaments_controller.rb
@@ -116,7 +116,8 @@ class TournamentsController < ApplicationController
success = true
ActiveRecord::Base.transaction do
success &= @tournament.save &&
- success &= @tournament.stages.create(scheduling: "elimination")
+ sched = tournament_attribute_params[:type_opt]
+ success &= @tournament.stages.create(scheduling: sched)
success &= @tournament.stages.first.create_matches
end
if success