diff options
author | nfoy <nfoy@purdue.edu> | 2014-04-23 20:40:56 -0400 |
---|---|---|
committer | nfoy <nfoy@purdue.edu> | 2014-04-23 20:40:56 -0400 |
commit | 422a7b39a06e2fe54415f2be08548021a981e8a8 (patch) | |
tree | 7e76d1383848caa999a954192cb48f86c209db7e /app/controllers | |
parent | d0a0f806a4bb8072c532ea7b35ad8b7643ac8645 (diff) |
Beginnings of actual messageboxer api
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/pms_controller.rb | 6 |
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.' } |