diff options
author | guntasgrewal <guntasgrewal@gmail.com> | 2014-04-26 23:38:36 -0400 |
---|---|---|
committer | guntasgrewal <guntasgrewal@gmail.com> | 2014-04-26 23:38:36 -0400 |
commit | 506486a6a38fc73b49dd35077cfaafbdf891c664 (patch) | |
tree | f7eac08b42735c51692abd44c500711253a38aca /app/controllers/alerts_controller.rb | |
parent | 4638a832b3b9da87bf076f4370e0d99bdf11ee78 (diff) |
Some shit I did
Diffstat (limited to 'app/controllers/alerts_controller.rb')
-rw-r--r-- | app/controllers/alerts_controller.rb | 7 |
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 |