From c38a00c8fbc549d1ec45834ee05b19a38d2dd246 Mon Sep 17 00:00:00 2001 From: guntasgrewal Date: Thu, 24 Apr 2014 18:41:53 -0400 Subject: TOMER WE ADDED YOUR DESIRED 5 TEAM SEED --- app/controllers/matches_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/controllers') diff --git a/app/controllers/matches_controller.rb b/app/controllers/matches_controller.rb index 1ad86d0..138cf28 100644 --- a/app/controllers/matches_controller.rb +++ b/app/controllers/matches_controller.rb @@ -23,8 +23,8 @@ class MatchesController < ApplicationController @match.teams.each do |team| team.users.each do |user| - players_id.push(user.remote_usernames[0]["json_value"]["id"]) - players.push(user.remote_usernames[0]["json_value"]["id"]) + players_id.push(user.remote_usernames[0].value["id"]) + players.push(user.remote_usernames[0].value["name"]) end end -- cgit v1.2.3-2-g168b From 9823642115ef52f0a21b9466cef412098a124f3d Mon Sep 17 00:00:00 2001 From: nfoy Date: Thu, 24 Apr 2014 19:03:36 -0400 Subject: Mailboxer progress without generate changes. --- app/controllers/pms_controller.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'app/controllers') 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 -- cgit v1.2.3-2-g168b