summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorguntasgrewal <guntasgrewal@gmail.com>2014-04-26 23:38:36 -0400
committerguntasgrewal <guntasgrewal@gmail.com>2014-04-26 23:38:36 -0400
commit506486a6a38fc73b49dd35077cfaafbdf891c664 (patch)
treef7eac08b42735c51692abd44c500711253a38aca /app/controllers
parent4638a832b3b9da87bf076f4370e0d99bdf11ee78 (diff)
Some shit I did
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/alerts_controller.rb7
-rw-r--r--app/controllers/tournaments_controller.rb8
2 files changed, 13 insertions, 2 deletions
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