From c57c7210cd9216a72da8e9c7321d416ebfe1391e Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Thu, 24 May 2007 20:39:51 +0000 Subject: Ensure that associations with :dependent => :delete_all respect :conditions option. Closes #8034 [danger, joshpeek, Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6827 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/fixtures/company.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activerecord/test/fixtures/company.rb') diff --git a/activerecord/test/fixtures/company.rb b/activerecord/test/fixtures/company.rb index ff92b14fcb..0c93c80e03 100755 --- a/activerecord/test/fixtures/company.rb +++ b/activerecord/test/fixtures/company.rb @@ -50,6 +50,8 @@ end class ExclusivelyDependentFirm < Company has_one :account, :foreign_key => "firm_id", :dependent => :delete + has_many :dependent_sanitized_conditional_clients_of_firm, :foreign_key => "client_of", :class_name => "Client", :order => "id", :dependent => :delete_all, :conditions => "name = 'BigShot Inc.'" + has_many :dependent_conditional_clients_of_firm, :foreign_key => "client_of", :class_name => "Client", :order => "id", :dependent => :delete_all, :conditions => ["name = ?", 'BigShot Inc.'] end class Client < Company -- cgit v1.2.3