Skip to content

Commit 75f35de

Browse files
author
Ryan Bigg
committed
Section 5.2.2: Cull tickets when project gets destroyed
1 parent a4d55f2 commit 75f35de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ticketee/app/models/project.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class Project < ActiveRecord::Base
22
validates :name, presence: true
33

4-
has_many :tickets
4+
has_many :tickets, dependent: :delete_all
55
end

0 commit comments

Comments
 (0)