作品消息状态更新

This commit is contained in:
huang 2015-09-08 09:43:41 +08:00
parent 8d72a9a539
commit 4c73e00eaf
1 changed files with 3 additions and 2 deletions

View File

@ -67,12 +67,13 @@ class StudentWorkController < ApplicationController
end end
def index def index
# 消息状态更新 # 作业消息状态更新
@homework.course_messages.each do |homework_message| @homework.course_messages.each do |homework_message|
if User.current.id == homework_message.user_id if User.current.id == homework_message.user_id
homework_message.update_attributes(:viewed => true) homework_message.update_attributes(:viewed => true)
end end
end end
# 作品消息状态更新
# 消息end # 消息end
#设置作业对应的forge_messages表的viewed字段 #设置作业对应的forge_messages表的viewed字段