From 6b71a1416cb1457517b27cd0a55cb32df0cdf0c3 Mon Sep 17 00:00:00 2001 From: Paul Nikitochkin Date: Sun, 27 Oct 2013 19:39:22 +0200 Subject: Skip `include_values` from through associations chains for building target scope Fixes: #12242, #9517, #10240 --- .../test/cases/associations/has_many_through_associations_test.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/test/cases/associations') diff --git a/activerecord/test/cases/associations/has_many_through_associations_test.rb b/activerecord/test/cases/associations/has_many_through_associations_test.rb index 3b61b91d62..b1e823729e 100644 --- a/activerecord/test/cases/associations/has_many_through_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_through_associations_test.rb @@ -1085,4 +1085,8 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase readers(:michael_authorless).update(first_post_id: 1) assert_equal [posts(:thinking)], person.reload.first_posts end + + def test_has_many_through_with_includes_in_through_association_scope + posts(:welcome).author_address_extra_with_address.to_a + end end -- cgit v1.2.3