diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index f78112c21..144e86f4f 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 52a7f585a..a4f53c100 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,