From 6f5d6c382b9258cc459391336d9e5bd72358cc32 Mon Sep 17 00:00:00 2001 From: z9hang Date: Wed, 2 Jul 2014 17:06:34 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E7=94=A8=E6=88=B7=E7=95=99=E8=A8=80?= =?UTF-8?q?=E7=9A=84=E5=9B=9E=E5=A4=8D=E8=8B=A5=E4=B8=BA=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E8=AE=A1=E5=85=A5=E6=96=B0=E7=95=99=E8=A8=80=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 6 +++++- app/controllers/words_controller.rb | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index f78112c2..144e86f4 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -52,6 +52,7 @@ class UsersController < ApplicationController helper :custom_fields include CustomFieldsHelper include AvatarHelper + include WordsHelper # added by liuping 关注 @@ -235,7 +236,10 @@ class UsersController < ApplicationController def user_newfeedback @jours = @user.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC') @jours.update_all(:is_readed => true, :status => false) - + @jours.each do |journal| + fetch_user_leaveWord_reply(journal).update_all(:is_readed => true, :status => false) + end + @limit = 10 @feedback_count = @jours.count @feedback_pages = Paginator.new @feedback_count, @limit, params['page'] diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb index 52a7f585..a4f53c10 100644 --- a/app/controllers/words_controller.rb +++ b/app/controllers/words_controller.rb @@ -56,7 +56,8 @@ class WordsController < ApplicationController reply_user_id = params[:reference_user_id] reply_id = params[:reference_message_id] # 暂时不实现 content = params[:user_notes] - options = {:user_id => author_id, + options = {:user_id => author_id, + :status => true, :m_parent_id => parent_id, :m_reply_id => reply_id, :reply_id => reply_user_id,