班级贴子的消息点击之后,不会变成已读
This commit is contained in:
parent
0b0ca61f1c
commit
401880bc26
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue