diff options
author | tkimia <tkimia@purdue.edu> | 2014-04-24 19:06:48 -0400 |
---|---|---|
committer | tkimia <tkimia@purdue.edu> | 2014-04-24 19:06:48 -0400 |
commit | afaf547a9685be8fd15c4496c3c1716e717b3fd7 (patch) | |
tree | 8c3e4c5b8a3accab6ec25dc956e27f37b44ccb8f /app/controllers/pms_controller.rb | |
parent | c909eb46740a1daeaf8fac1d60d0e4539f01e342 (diff) | |
parent | 1b11684986136ee87da6242c3ba6aba5ef581510 (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.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/app/controllers/pms_controller.rb b/app/controllers/pms_controller.rb index 1d6540d..9dbe760 100644 --- a/app/controllers/pms_controller.rb +++ b/app/controllers/pms_controller.rb @@ -24,11 +24,11 @@ class PmsController < ApplicationController def create @pm = Pm.new(pm_params) @pm.author = current_user - require 'pp' - pp @pm.message + #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') + @pm.conversation = @pm.author.send_message(@pm.recipient, @pm.message, @pm.subject).conversation respond_to do |format| if @pm.save @@ -41,6 +41,10 @@ class PmsController < ApplicationController end end + #def reply + # current_user.reply_to_conversation(conversation, message) + #end + # PATCH/PUT /pms/1 # PATCH/PUT /pms/1.json def update |