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 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app/controllers/alerts_controller.rb') 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 -- cgit v1.2.3-2-g168b