aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2008-01-27 02:41:55 +0000
committerMichael Koziarski <michael@koziarski.com>2008-01-27 02:41:55 +0000
commit9500ad5fbc337d881dc953631f6d808ad08774c1 (patch)
tree368267c053dc6d0c18c0c0a04d76bcdd6bcf9292 /activerecord/test/models
parentf11904ad6d0d9981dfb54b8fe07bfa908607db35 (diff)
downloadrails-9500ad5fbc337d881dc953631f6d808ad08774c1.tar.gz
rails-9500ad5fbc337d881dc953631f6d808ad08774c1.tar.bz2
rails-9500ad5fbc337d881dc953631f6d808ad08774c1.zip
Make sure count works on has_many :through associations using :group. Closes #10480 [remvee]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8742 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/models')
-rw-r--r--activerecord/test/models/author.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/models/author.rb b/activerecord/test/models/author.rb
index 593d77342e..64e4d38114 100644
--- a/activerecord/test/models/author.rb
+++ b/activerecord/test/models/author.rb
@@ -20,6 +20,7 @@ class Author < ActiveRecord::Base
has_many :funky_comments, :through => :posts, :source => :comments
has_many :ordered_uniq_comments, :through => :posts, :source => :comments, :uniq => true, :order => 'comments.id'
has_many :ordered_uniq_comments_desc, :through => :posts, :source => :comments, :uniq => true, :order => 'comments.id DESC'
+ has_many :grouped_comments, :through => :posts, :source => :comments, :group => 'comments.post_id'
has_many :special_posts
has_many :special_post_comments, :through => :special_posts, :source => :comments