File tree Expand file tree Collapse file tree 2 files changed +0
-14
lines changed
lib/active_record/relation Expand file tree Collapse file tree 2 files changed +0
-14
lines changed Original file line number Diff line number Diff line change @@ -365,7 +365,6 @@ def exists?(conditions = :none)
365
365
end
366
366
367
367
return false if !conditions || limit_value == 0
368
- return !records . empty? if conditions == :none && loaded?
369
368
370
369
if eager_loading?
371
370
relation = apply_join_dependency ( eager_loading : false )
Original file line number Diff line number Diff line change @@ -285,19 +285,6 @@ def test_exists_returns_true_with_one_record_and_no_args
285
285
assert_equal true , Topic . exists?
286
286
end
287
287
288
- def test_exists_with_loaded_relation
289
- topics = Topic . all . load
290
- assert_no_queries do
291
- assert_equal true , topics . exists?
292
- end
293
-
294
- Topic . delete_all
295
- topics = Topic . all . load
296
- assert_no_queries do
297
- assert_equal false , topics . exists?
298
- end
299
- end
300
-
301
288
def test_exists_returns_false_with_false_arg
302
289
assert_equal false , Topic . exists? ( false )
303
290
end
You can’t perform that action at this time.
0 commit comments