From 44d6914991d8e27b5f873862f005fee070ed53a0 Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Sun, 4 Mar 2012 21:55:45 +0100 Subject: [PATCH] :dependent => :destroy for Asciicast#comments --- app/models/asciicast.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/asciicast.rb b/app/models/asciicast.rb index 6cfe13d..048d763 100644 --- a/app/models/asciicast.rb +++ b/app/models/asciicast.rb @@ -8,7 +8,7 @@ class Asciicast < ActiveRecord::Base validates :terminal_columns, :terminal_lines, :duration, :presence => true belongs_to :user - has_many :comments, :order => :created_at + has_many :comments, :order => :created_at, :dependent => :destroy before_create :assign_user, :unless => :user