diff options
-rw-r--r-- | app/controllers/alerts_controller.rb | 5 | ||||
-rw-r--r-- | app/controllers/tournaments_controller.rb | 3 | ||||
-rwxr-xr-x | start | 11 | ||||
-rwxr-xr-x | start.sh | 4 |
4 files changed, 18 insertions, 5 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 @@ -0,0 +1,11 @@ +#!/bin/bash + +if [ $1 == "-c" ]; then + bundle exec rails c +fi +if [ $1 == "-s" ]; then + bundle exec rails s +fi + +#echo "Only use: start -c or start -s. Don't be a jackass." + diff --git a/start.sh b/start.sh deleted file mode 100755 index 2b58327..0000000 --- a/start.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -bundle exec rails server --daemon - |