From 8a8c9bf7c3dccaa32dc38fe340e0901c3b94661d Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 18 Mar 2016 12:41:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/course_activity.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/course_activity.rb b/app/models/course_activity.rb index a02eb750c..49326f06b 100644 --- a/app/models/course_activity.rb +++ b/app/models/course_activity.rb @@ -75,7 +75,7 @@ class CourseActivity < ActiveRecord::Base # message的status状态为0为正常,为1表示创建课程时发送的message # author_id 默认为课程使者创建 message = Message.create(:subject => name, :content => content, :board_id => self.course.boards.first.id, :author_id => 1 , :sticky => true, :status => true ) - # 更新的目的是为了排序,因为该条动态的时间可能与课程创建的动态创建时间一直 + # 更新的目的是为了排序,因为该条动态的时间可能与课程创建的动态创建时间一致 message.course_acts.first.update_attribute(:updated_at, message.course_acts.first.updated_at + 1) if message.course_acts.first end end