summaryrefslogtreecommitdiff
path: root/app/controllers/alerts_controller.rb
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/alerts_controller.rb
parent4638a832b3b9da87bf076f4370e0d99bdf11ee78 (diff)
Some shit I did
Diffstat (limited to 'app/controllers/alerts_controller.rb')
-rw-r--r--app/controllers/alerts_controller.rb7
1 files changed, 5 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