summaryrefslogtreecommitdiffstats
path: root/app/models/board.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-11-27 12:42:11 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-11-27 12:42:11 +0000
commit4faca3cd4a7d8c7d39c7e73784ccaae076471e7b (patch)
treed682b1e474558752b7a32be1438826390ab0070b /app/models/board.rb
parent97140f6a7828ff3f2eed25de1553a92ee67f4c24 (diff)
downloadredmine-4faca3cd4a7d8c7d39c7e73784ccaae076471e7b.tar.gz
redmine-4faca3cd4a7d8c7d39c7e73784ccaae076471e7b.zip
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
Diffstat (limited to 'app/models/board.rb')
-rw-r--r--app/models/board.rb2
1 files changed, 1 insertions, 1 deletions
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