班级贴子的消息点击之后,不会变成已读

This commit is contained in:
daiao 2017-03-09 11:19:54 +08:00
parent 0b0ca61f1c
commit 401880bc26
1 changed files with 5 additions and 0 deletions

View File

@ -64,6 +64,11 @@ class MessagesController < ApplicationController
#offset(@reply_pages.offset). #offset(@reply_pages.offset).
#all #all
#@replies = paginateHelper messages_replies,10 #@replies = paginateHelper messages_replies,10
# 班级帖子消息设为已读
@replies.each do |comment|
course_message = CourseMessage.where(:course_message_id => comment.id, :user_id => User.current.id, :viewed => 0)
course_message.update_all(:viewed => 1)
end
@left_nav_type = 2 @left_nav_type = 2
respond_to do |format| respond_to do |format|
format.js format.js