作品消息状态更新

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