删除项目的时候,项目动态级联删除

This commit is contained in:
huang 2015-10-15 10:07:46 +08:00
parent 9399063886
commit 554927d517
1 changed files with 3 additions and 1 deletions

View File

@ -91,8 +91,10 @@ class Project < ActiveRecord::Base
has_many :tags, :through => :project_tags, :class_name => 'Tag'
has_many :project_tags, :class_name => 'ProjectTags'
# 动态级联删除
has_many :forge_activities, :class_name => 'ForgeActivity', :dependent => :destroy
# 关联虚拟表
has_many :forge_messages, :class_name =>'ForgeMessage', :as => :forge_message, :dependent => :destroy
has_many :forge_messages, :class_name =>'ForgeMessage', :as => :forge_message, :dependent => :destroy
belongs_to :organization