From 7eb3b186c4f23f17965efb713c24edd88788e6c8 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 25 Jun 2007 19:17:58 +0000 Subject: [PATCH] Fixed an error when trying to delete a project (versions/issues dependency) git-svn-id: http://redmine.rubyforge.org/svn/trunk@574 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/project.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/project.rb b/app/models/project.rb index 2cdf14b28..488724432 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -20,11 +20,11 @@ class Project < ActiveRecord::Base STATUS_ACTIVE = 1 STATUS_ARCHIVED = 9 - has_many :versions, :dependent => :destroy, :order => "#{Version.table_name}.effective_date DESC, #{Version.table_name}.name DESC" has_many :members, :dependent => :delete_all, :include => :user, :conditions => "#{User.table_name}.status=#{User::STATUS_ACTIVE}" has_many :users, :through => :members has_many :custom_values, :dependent => :delete_all, :as => :customized has_many :issues, :dependent => :destroy, :order => "#{Issue.table_name}.created_on DESC", :include => [:status, :tracker] + has_many :versions, :dependent => :destroy, :order => "#{Version.table_name}.effective_date DESC, #{Version.table_name}.name DESC" has_many :time_entries, :dependent => :delete_all has_many :queries, :dependent => :delete_all has_many :documents, :dependent => :destroy