From 2d0fe1a4197e70cb99f4285a8b32a645914d8beb Mon Sep 17 00:00:00 2001 From: guntasgrewal Date: Sat, 26 Apr 2014 20:35:43 -0400 Subject: Wrote a script the start the server called start deleted the old one. The new one has 2 flag options -c and -s these correspond to starting the console or server respectively. --- app/controllers/alerts_controller.rb | 5 +++++ app/controllers/tournaments_controller.rb | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'app/controllers') 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 1354ad6..6ba259e 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 -- cgit v1.2.3-2-g168b