[#4177] Destroy Deliverables when a Contract is destroyed.
This commit is contained in:
@@ -4,7 +4,7 @@ class Contract < ActiveRecord::Base
|
||||
# Associations
|
||||
belongs_to :project
|
||||
belongs_to :account_executive, :class_name => 'User', :foreign_key => 'account_executive_id'
|
||||
has_many :deliverables
|
||||
has_many :deliverables, :dependent => :destroy
|
||||
|
||||
# Validations
|
||||
validates_presence_of :name
|
||||
|
||||
Reference in New Issue
Block a user