修改删除的关联的500问题
This commit is contained in:
parent
947fcc160c
commit
580735ef79
|
@ -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虚拟关联
|
||||
|
|
Loading…
Reference in New Issue