From e990a17fdb07bbf0c2862d90c884d06192026f0a Mon Sep 17 00:00:00 2001 From: fanqiang <316257774@qq.com> Date: Thu, 5 Dec 2013 15:50:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=95=99=E8=A8=80=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=201.=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5=E7=95=99?= =?UTF-8?q?=E8=A8=80=E6=A0=B7=E5=BC=8F=E4=B8=A2=E5=A4=B1=E9=97=AE=E9=A2=98?= =?UTF-8?q?=202.=E5=AF=B9=E7=94=A8=E6=88=B7=E7=95=99=E8=A8=80=E5=9B=9E?= =?UTF-8?q?=E5=A4=8D=EF=BC=8C=E4=BC=9A=E5=90=8C=E6=97=B6=E5=9C=A8=E8=AF=A5?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=B8=BB=E9=A1=B5=E8=BF=9B=E8=A1=8C=E7=95=99?= =?UTF-8?q?=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/words_controller.rb | 3 +++ app/views/words/_message.html.erb | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb index e58b1d672..bde91fcfd 100644 --- a/app/controllers/words_controller.rb +++ b/app/controllers/words_controller.rb @@ -13,6 +13,9 @@ class WordsController < ApplicationController refer_user_id = params[:new_form][:reference_user_id].to_i @user.add_jour(User.current, message, refer_user_id) + unless refer_user_id == 0 + User.find(refer_user_id).add_jour(User.current, message, refer_user_id) + end @user.count_new_jour # if a_message.size > 5 # @message = a_message[-5, 5] diff --git a/app/views/words/_message.html.erb b/app/views/words/_message.html.erb index e45c72662..519f0062a 100644 --- a/app/views/words/_message.html.erb +++ b/app/views/words/_message.html.erb @@ -19,7 +19,7 @@

- <%= h journal.notes%> + <%= textilizable journal.notes%>