aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/author.rb
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2009-04-20 18:12:40 +0100
committerPratik Naik <pratiknaik@gmail.com>2009-04-20 18:12:40 +0100
commitde0ea3866370ec61581f910cf393a3cc97eba32f (patch)
treeb32efb2bea337b96c875ac5e78c39760c5e663bf /activerecord/test/models/author.rb
parent489abfd3b23f3c4b3de86aeb3bde3970771c001b (diff)
downloadrails-de0ea3866370ec61581f910cf393a3cc97eba32f.tar.gz
rails-de0ea3866370ec61581f910cf393a3cc97eba32f.tar.bz2
rails-de0ea3866370ec61581f910cf393a3cc97eba32f.zip
Ensure :dependent => :delete_all works for association with hash conditions
Diffstat (limited to 'activerecord/test/models/author.rb')
-rw-r--r--activerecord/test/models/author.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/models/author.rb b/activerecord/test/models/author.rb
index 669c664bf4..0d9ee36b20 100644
--- a/activerecord/test/models/author.rb
+++ b/activerecord/test/models/author.rb
@@ -25,7 +25,7 @@ class Author < ActiveRecord::Base
has_many :comments_with_order_and_conditions, :through => :posts, :source => :comments, :order => 'comments.body', :conditions => "comments.body like 'Thank%'"
has_many :comments_with_include, :through => :posts, :source => :comments, :include => :post
- has_many :thinking_posts, :class_name => 'Post', :conditions => { :title => 'So I was thinking' }
+ has_many :thinking_posts, :class_name => 'Post', :conditions => { :title => 'So I was thinking' }, :dependent => :delete_all
has_many :welcome_posts, :class_name => 'Post', :conditions => { :title => 'Welcome to the weblog' }
has_many :comments_desc, :through => :posts, :source => :comments, :order => 'comments.id DESC'