summaryrefslogtreecommitdiff
path: root/app/controllers/pms_controller.rb
diff options
context:
space:
mode:
authorLuke Shumaker <shumakl@purdue.edu>2014-04-23 20:46:17 -0400
committerLuke Shumaker <shumakl@purdue.edu>2014-04-23 20:46:17 -0400
commit9003a9099719a771fbbb9d2e8a4bfb093f35929a (patch)
tree83c11934584978d84bf4c5ced57f9fc883e91b60 /app/controllers/pms_controller.rb
parent66f225b6aef0946a79abee5e67f74afbf8ea9d1e (diff)
parent9afd5a4f7a86eeaab3fa8a0c25609ac7977e0489 (diff)
Merge branch 'master' of https://github.com/LukeShu/leaguer
Diffstat (limited to 'app/controllers/pms_controller.rb')
-rw-r--r--app/controllers/pms_controller.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/pms_controller.rb b/app/controllers/pms_controller.rb
index 1279fdf..2cb55f8 100644
--- a/app/controllers/pms_controller.rb
+++ b/app/controllers/pms_controller.rb
@@ -24,10 +24,12 @@ 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_params['recipient_id']
@pm.recipient = User.find_by_user_name(pm_params['recipient_id'])
+ @pm.author.send_message(@pm.recipient, @pm.message, 'Default')
+
respond_to do |format|
if @pm.save
format.html { redirect_to @pm, notice: 'Pm was successfully created.' }