aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-05-11 12:44:05 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-05-11 12:52:32 +0900
commit07a611e02351b32100f19495a34ed46d01f195c1 (patch)
treec07e9bdb83b0703df3cb026215f1a29d15d5903f /activerecord/test
parent97bd56e674603529d96c6f6e85d695dd24208afb (diff)
downloadrails-07a611e02351b32100f19495a34ed46d01f195c1.tar.gz
rails-07a611e02351b32100f19495a34ed46d01f195c1.tar.bz2
rails-07a611e02351b32100f19495a34ed46d01f195c1.zip
Don't eager loading if unneeded for `FinderMethods#exists?`
Fixes #29025.
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/associations/eager_test.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/cases/associations/eager_test.rb b/activerecord/test/cases/associations/eager_test.rb
index 11f4aae5b3..36238dd088 100644
--- a/activerecord/test/cases/associations/eager_test.rb
+++ b/activerecord/test/cases/associations/eager_test.rb
@@ -1363,6 +1363,7 @@ class EagerAssociationTest < ActiveRecord::TestCase
assert_nothing_raised do
authors(:david).essays.includes(:writer).any?
authors(:david).essays.includes(:writer).exists?
+ authors(:david).essays.includes(:owner).where("name IS NOT NULL").exists?
end
end