From 4faca3cd4a7d8c7d39c7e73784ccaae076471e7b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 27 Nov 2010 12:42:11 +0000 Subject: Fixed: messages attachments/watchers are not deleted when deleting a project or forum (#6966). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4431 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/board.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/models/board.rb b/app/models/board.rb index e7310da65..de0e444b9 100644 --- a/app/models/board.rb +++ b/app/models/board.rb @@ -18,7 +18,7 @@ class Board < ActiveRecord::Base belongs_to :project has_many :topics, :class_name => 'Message', :conditions => "#{Message.table_name}.parent_id IS NULL", :order => "#{Message.table_name}.created_on DESC" - has_many :messages, :dependent => :delete_all, :order => "#{Message.table_name}.created_on DESC" + has_many :messages, :dependent => :destroy, :order => "#{Message.table_name}.created_on DESC" belongs_to :last_message, :class_name => 'Message', :foreign_key => :last_message_id acts_as_list :scope => :project_id acts_as_watchable -- cgit v1.2.3