aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/post.rb
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2011-05-24 07:21:32 +0100
committerAndrew White <andyw@pixeltrix.co.uk>2011-05-24 07:21:32 +0100
commitd8bd19f6abd1f8cb344ff5c77971a357c4f5b3ec (patch)
treeba5c02da9a8625b031e45424240097f368121ce1 /activerecord/test/models/post.rb
parenta47a65f105bc7bac5fe7995a664f8f6afaa339c1 (diff)
downloadrails-d8bd19f6abd1f8cb344ff5c77971a357c4f5b3ec.tar.gz
rails-d8bd19f6abd1f8cb344ff5c77971a357c4f5b3ec.tar.bz2
rails-d8bd19f6abd1f8cb344ff5c77971a357c4f5b3ec.zip
Ignore :includes on through associations
Diffstat (limited to 'activerecord/test/models/post.rb')
-rw-r--r--activerecord/test/models/post.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/models/post.rb b/activerecord/test/models/post.rb
index 80296032bb..f2ab7b053e 100644
--- a/activerecord/test/models/post.rb
+++ b/activerecord/test/models/post.rb
@@ -162,3 +162,9 @@ class FirstPost < ActiveRecord::Base
has_many :comments, :foreign_key => :post_id
has_one :comment, :foreign_key => :post_id
end
+
+class PostWithDefaultInclude < ActiveRecord::Base
+ self.table_name = 'posts'
+ default_scope includes(:comments)
+ has_many :comments, :foreign_key => :post_id
+end \ No newline at end of file