From 19b04a49d01af1917385c166501ef086eddae437 Mon Sep 17 00:00:00 2001 From: guntasgrewal Date: Wed, 23 Apr 2014 22:50:29 -0400 Subject: The users with permissions to send alerts can now create new alerts. --- app/controllers/alerts_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers') diff --git a/app/controllers/alerts_controller.rb b/app/controllers/alerts_controller.rb index 333022a..6ab3663 100644 --- a/app/controllers/alerts_controller.rb +++ b/app/controllers/alerts_controller.rb @@ -23,7 +23,7 @@ class AlertsController < ApplicationController # POST /alerts.json def create @alert = Alert.new(alert_params) - + @alert.author = current_user respond_to do |format| if @alert.save format.html { redirect_to @alert, notice: 'Alert was successfully created.' } -- cgit v1.2.3-2-g168b From 107f1f65c93cbe118a69e76514327c4862c7d51d Mon Sep 17 00:00:00 2001 From: nfoy Date: Wed, 23 Apr 2014 22:52:58 -0400 Subject: More mailboxer progress --- app/controllers/pms_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/controllers') diff --git a/app/controllers/pms_controller.rb b/app/controllers/pms_controller.rb index 2cb55f8..1d6540d 100644 --- a/app/controllers/pms_controller.rb +++ b/app/controllers/pms_controller.rb @@ -24,8 +24,8 @@ class PmsController < ApplicationController def create @pm = Pm.new(pm_params) @pm.author = current_user - #require 'pp' - #pp pm_params['recipient_id'] + require 'pp' + pp @pm.message @pm.recipient = User.find_by_user_name(pm_params['recipient_id']) @pm.author.send_message(@pm.recipient, @pm.message, 'Default') -- cgit v1.2.3-2-g168b