From 506486a6a38fc73b49dd35077cfaafbdf891c664 Mon Sep 17 00:00:00 2001 From: guntasgrewal Date: Sat, 26 Apr 2014 23:38:36 -0400 Subject: Some shit I did --- app/controllers/alerts_controller.rb | 7 +++++-- app/controllers/tournaments_controller.rb | 8 ++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'app/controllers') diff --git a/app/controllers/alerts_controller.rb b/app/controllers/alerts_controller.rb index 1d09864..77ca8b9 100644 --- a/app/controllers/alerts_controller.rb +++ b/app/controllers/alerts_controller.rb @@ -25,9 +25,12 @@ class AlertsController < ApplicationController @alert = Alert.new(alert_params) @alert.author = current_user users = {} - users = Users.all + users = User.all - #current_user.send_message(users, @alert.message, "Pay Attention!") + + for i in 0..users.length + current_user.send_message(users[i], @alert.message, "Pay Attention!") + end respond_to do |format| if @alert.save diff --git a/app/controllers/tournaments_controller.rb b/app/controllers/tournaments_controller.rb index 60f8789..734253a 100644 --- a/app/controllers/tournaments_controller.rb +++ b/app/controllers/tournaments_controller.rb @@ -67,6 +67,14 @@ class TournamentsController < ApplicationController end end + def create_stage + + # stage = @tournament.stages.new + # stage.create(TODO:PARAMETERS) + # @tournament.stages.push(stage) + + end + # PATCH/PUT /tournaments/1 # PATCH/PUT /tournaments/1.json def update -- cgit v1.2.3