From 580735ef79535b0e38ee36784adb254c253ef597 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 21 Aug 2015 11:28:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=A0=E9=99=A4=E7=9A=84?= =?UTF-8?q?=E5=85=B3=E8=81=94=E7=9A=84500=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/news.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/news.rb b/app/models/news.rb index 30e4b0f55..6e2725d1c 100644 --- a/app/models/news.rb +++ b/app/models/news.rb @@ -23,7 +23,7 @@ class News < ActiveRecord::Base #added by nwb belongs_to :course belongs_to :author, :class_name => 'User', :foreign_key => 'author_id' - has_many :comments, :as => :commented, :dependent => :delete_all, :order => "created_on" + has_many :comments, :as => :commented, :dependent => :destroy, :order => "created_on" # fq has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy # 被ForgeActivity虚拟关联