summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorLuke Shumaker <shumakl@purdue.edu>2014-04-26 20:40:00 -0400
committerLuke Shumaker <shumakl@purdue.edu>2014-04-26 20:40:00 -0400
commitedcca83c6c251a79afcd83760cf20ebaf00b3b32 (patch)
tree9adac49d575ebdccbe8961e3960947508d43b647 /app/controllers
parented4f3dad6cd92710bf9cbafc36cf87dae8605f73 (diff)
parent1d24cb050f198e9c8bec8dd014de203d889ab56a (diff)
Merge branch 'master' of https://github.com/LukeShu/leaguer
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/alerts_controller.rb5
-rw-r--r--app/controllers/tournaments_controller.rb3
2 files changed, 7 insertions, 1 deletions
diff --git a/app/controllers/alerts_controller.rb b/app/controllers/alerts_controller.rb
index 6ab3663..1d09864 100644
--- a/app/controllers/alerts_controller.rb
+++ b/app/controllers/alerts_controller.rb
@@ -24,6 +24,11 @@ class AlertsController < ApplicationController
def create
@alert = Alert.new(alert_params)
@alert.author = current_user
+ users = {}
+ users = Users.all
+
+ #current_user.send_message(users, @alert.message, "Pay Attention!")
+
respond_to do |format|
if @alert.save
format.html { redirect_to @alert, notice: 'Alert was successfully created.' }
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