aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/comment.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/models/comment.rb')
-rw-r--r--activerecord/test/models/comment.rb2
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