aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorGabe da Silveira <gabe@websaviour.com>2009-08-09 12:53:22 -0700
committerPratik Naik <pratiknaik@gmail.com>2009-08-10 00:30:44 +0100
commit00d6c766608f90ce64f11feb98786cbc7f71b89d (patch)
treefacb90eba8022d93b0cc9c3aba566694617ce583 /activerecord/test/models
parent810b59a2a9da3e85bc85d2617ae781c1b3645af4 (diff)
downloadrails-00d6c766608f90ce64f11feb98786cbc7f71b89d.tar.gz
rails-00d6c766608f90ce64f11feb98786cbc7f71b89d.tar.bz2
rails-00d6c766608f90ce64f11feb98786cbc7f71b89d.zip
Enable has_many :through for going through a has_one association on the join model [#2719 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
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 b844c7cce0..f264f980d6 100644
--- a/activerecord/test/models/author.rb
+++ b/activerecord/test/models/author.rb
@@ -1,5 +1,6 @@
class Author < ActiveRecord::Base
has_many :posts
+ has_many :very_special_comments, :through => :posts
has_many :posts_with_comments, :include => :comments, :class_name => "Post"
has_many :popular_grouped_posts, :include => :comments, :class_name => "Post", :group => "type", :having => "SUM(comments_count) > 1", :select => "type"
has_many :posts_with_comments_sorted_by_comment_id, :include => :comments, :class_name => "Post", :order => 'comments.id'