diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2012-04-19 06:26:13 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2012-04-19 06:26:13 -0700 |
commit | b9e5c5aca3313bd67b35a608c504175f99172d7f (patch) | |
tree | 5075061b731f1203dca6551cb1b696a246c916b6 /activerecord/test/models/comment.rb | |
parent | 1166d49f62ccab789be208112163ad13183224e2 (diff) | |
parent | ebfa58abc895c0639211cb896a47b04e424322c8 (diff) | |
download | rails-b9e5c5aca3313bd67b35a608c504175f99172d7f.tar.gz rails-b9e5c5aca3313bd67b35a608c504175f99172d7f.tar.bz2 rails-b9e5c5aca3313bd67b35a608c504175f99172d7f.zip |
Merge pull request #5898 from benedikt/3-2-stable
Readds the fix for #5667 and back ports the regression fix from #5718
Diffstat (limited to 'activerecord/test/models/comment.rb')
-rw-r--r-- | activerecord/test/models/comment.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/test/models/comment.rb b/activerecord/test/models/comment.rb index 88b139d931..bca937a299 100644 --- a/activerecord/test/models/comment.rb +++ b/activerecord/test/models/comment.rb @@ -11,6 +11,8 @@ class Comment < ActiveRecord::Base belongs_to :post, :counter_cache => true has_many :ratings + belongs_to :first_post, :foreign_key => :post_id + has_many :children, :class_name => 'Comment', :foreign_key => :parent_id belongs_to :parent, :class_name => 'Comment', :counter_cache => :children_count |