diff options
author | Benedikt Deicke <benedikt@synatic.net> | 2012-04-03 21:13:24 +0200 |
---|---|---|
committer | Benedikt Deicke <benedikt@synatic.net> | 2012-04-19 10:01:32 +0200 |
commit | 8491740ca5361ba9df20e1c8b906c709f5bfbc12 (patch) | |
tree | 85dde5ffd65ff13d4c4a8426109662e242654659 /activerecord/test/models/comment.rb | |
parent | 13f1401a6cf0266a3b0a91b173f976db2d4e50f3 (diff) | |
download | rails-8491740ca5361ba9df20e1c8b906c709f5bfbc12.tar.gz rails-8491740ca5361ba9df20e1c8b906c709f5bfbc12.tar.bz2 rails-8491740ca5361ba9df20e1c8b906c709f5bfbc12.zip |
Adds test to check that circular preloading does not modify Model.unscoped (as described in #5667)
Conflicts:
activerecord/test/cases/associations/eager_test.rb
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 |