From c1d753f63477a3131d98189ca2db22167c6d909c Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 2 Jun 2015 10:09:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=BF=81=E7=A7=BB=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=A2=9E=E5=8A=A0=E4=B8=AA=E4=BA=BA=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20150601032112_about_homework.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/db/migrate/20150601032112_about_homework.rb b/db/migrate/20150601032112_about_homework.rb index 317748741..fe3ca1c12 100644 --- a/db/migrate/20150601032112_about_homework.rb +++ b/db/migrate/20150601032112_about_homework.rb @@ -18,6 +18,13 @@ class AboutHomework < ActiveRecord::Migration homework.updated_at = bid.updated_on homework.save + #个人动态 + bid.acts.each do |act| + act.act_type = homework.class.to_s + act.act_id = homework.id + act.save + end + #作业附件 bid.attachments.each do |attach| attach.container = homework