diff options
author | Benedikt Deicke <benedikt@synatic.net> | 2012-04-03 21:13:24 +0200 |
---|---|---|
committer | Benedikt Deicke <benedikt@synatic.net> | 2012-04-03 21:13:24 +0200 |
commit | 402576b044ce1cb06c3e48061f62542d0908fa17 (patch) | |
tree | bddb57fc6c9619df94bc2479d02c7f25658d380d /activerecord/test/models | |
parent | 68677ffb8298105eb9d3efa26d928dd88cc5e006 (diff) | |
download | rails-402576b044ce1cb06c3e48061f62542d0908fa17.tar.gz rails-402576b044ce1cb06c3e48061f62542d0908fa17.tar.bz2 rails-402576b044ce1cb06c3e48061f62542d0908fa17.zip |
Adds test to check that circular preloading does not modify Model.unscoped (as described in #5667)
Diffstat (limited to 'activerecord/test/models')
-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 00f5a74070..cf73c28ded 100644 --- a/activerecord/test/models/comment.rb +++ b/activerecord/test/models/comment.rb @@ -9,6 +9,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 |