summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/alerts_controller.rb2
-rw-r--r--app/controllers/pms_controller.rb4
2 files changed, 3 insertions, 3 deletions
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.' }
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')