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虚拟关联