aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-05-24 15:34:28 -0700
committerJon Leighton <j@jonathanleighton.com>2011-05-24 15:34:28 -0700
commitce37f747cd37a480025fbe69c3b1e44cb6a6e3af (patch)
tree964e684400b32788cf620958702ab1d2e56a9a10 /activerecord/test/cases/associations
parenta000ff7a503158cc95bee9cd4b15ff9089f6828a (diff)
parentd8bd19f6abd1f8cb344ff5c77971a357c4f5b3ec (diff)
downloadrails-ce37f747cd37a480025fbe69c3b1e44cb6a6e3af.tar.gz
rails-ce37f747cd37a480025fbe69c3b1e44cb6a6e3af.tar.bz2
rails-ce37f747cd37a480025fbe69c3b1e44cb6a6e3af.zip
Merge pull request #1254 from pixeltrix/ignore-includes-in-through-scope
Ignore :includes on through associations
Diffstat (limited to 'activerecord/test/cases/associations')
-rw-r--r--activerecord/test/cases/associations/eager_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/associations/eager_test.rb b/activerecord/test/cases/associations/eager_test.rb
index e12a3e074c..5028cee32d 100644
--- a/activerecord/test/cases/associations/eager_test.rb
+++ b/activerecord/test/cases/associations/eager_test.rb
@@ -448,6 +448,12 @@ class EagerAssociationTest < ActiveRecord::TestCase
assert_equal post_tags, eager_post_tags
end
+ def test_eager_with_has_many_through_join_model_ignores_default_includes
+ assert_nothing_raised do
+ authors(:david).comments_on_posts_with_default_include.to_a
+ end
+ end
+
def test_eager_with_has_many_and_limit
posts = Post.find(:all, :order => 'posts.id asc', :include => [ :author, :comments ], :limit => 2)
assert_equal 2, posts.size