From 82b244e3ffb55b94597b0562919522625ebfd2d3 Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Thu, 16 Aug 2007 04:36:55 +0000 Subject: Make sure has_many associations honour :include when counting. Closes #9167 [danger] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7325 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/fixtures/author.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activerecord/test/fixtures') diff --git a/activerecord/test/fixtures/author.rb b/activerecord/test/fixtures/author.rb index 61ba3c1551..fa710bab9c 100644 --- a/activerecord/test/fixtures/author.rb +++ b/activerecord/test/fixtures/author.rb @@ -25,6 +25,7 @@ class Author < ActiveRecord::Base has_many :hello_posts, :class_name => "Post", :conditions => "posts.body = 'hello'" has_many :hello_post_comments, :through => :hello_posts, :source => :comments + has_many :posts_with_no_comments, :class_name => 'Post', :conditions => 'comments.id is null', :include => :comments has_many :other_posts, :class_name => "Post" has_many :posts_with_callbacks, :class_name => "Post", :before_add => :log_before_adding, -- cgit v1.2.3