aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/associations_go_eager_test.rb
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2006-07-24 04:55:16 +0000
committerRick Olson <technoweenie@gmail.com>2006-07-24 04:55:16 +0000
commit971e03f24e1121a2fe03beab23b0370a64fcfc37 (patch)
treee7c5df3357054e5a30d0b71d616036f5abe0ac86 /activerecord/test/associations_go_eager_test.rb
parent04d9e94e88be0ba076b0fef980e8bde8e25061d9 (diff)
downloadrails-971e03f24e1121a2fe03beab23b0370a64fcfc37.tar.gz
rails-971e03f24e1121a2fe03beab23b0370a64fcfc37.tar.bz2
rails-971e03f24e1121a2fe03beab23b0370a64fcfc37.zip
Allow #count through a has_many association to accept :include. [Dan Peterson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4618 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/associations_go_eager_test.rb')
-rw-r--r--activerecord/test/associations_go_eager_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/associations_go_eager_test.rb b/activerecord/test/associations_go_eager_test.rb
index d2ae4e0dd9..ddcd72d045 100644
--- a/activerecord/test/associations_go_eager_test.rb
+++ b/activerecord/test/associations_go_eager_test.rb
@@ -356,4 +356,8 @@ class EagerAssociationTest < Test::Unit::TestCase
assert_equal 2, one.comments.size
assert_equal 2, one.categories.size
end
+
+ def test_count_with_include
+ assert_equal 3, authors(:david).posts_with_comments.count(:conditions => "length(comments.body) > 15")
+ end
end