From c9b001b903a98813aa274e11714cc884fb858e2e Mon Sep 17 00:00:00 2001 From: Sergey Alekseev Date: Wed, 21 Oct 2020 22:13:39 +0300 Subject: [PATCH] fix boolean negation in documentation See a similar fix in 68d35960f336d5be3c5e35c88e6c8bdebcbcf500. Reading e1e17a55d246d485f546766606580e8e4919442b I'm not exactly sure whether it's intentional or not, but I tend to think it's a typo. [ci skip] --- .../lib/active_record/associations/collection_association.rb | 2 +- guides/source/api_documentation_guidelines.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/activerecord/lib/active_record/associations/collection_association.rb b/activerecord/lib/active_record/associations/collection_association.rb index 7e9a0770f6..599d663f97 100644 --- a/activerecord/lib/active_record/associations/collection_association.rb +++ b/activerecord/lib/active_record/associations/collection_association.rb @@ -228,7 +228,7 @@ module ActiveRecord # If the collection has been loaded # it is equivalent to collection.size.zero?. If the # collection has not been loaded, it is equivalent to - # collection.exists?. If the collection has not already been + # !collection.exists?. If the collection has not already been # loaded and you are going to fetch the records anyway it is better to # check collection.length.zero?. def empty? diff --git a/guides/source/api_documentation_guidelines.md b/guides/source/api_documentation_guidelines.md index 9a6ba68138..cdc0bcb61e 100644 --- a/guides/source/api_documentation_guidelines.md +++ b/guides/source/api_documentation_guidelines.md @@ -181,7 +181,7 @@ An example with a predicate: # If the collection has been loaded # it is equivalent to collection.size.zero?. If the # collection has not been loaded, it is equivalent to -# collection.exists?. If the collection has not already been +# !collection.exists?. If the collection has not already been # loaded and you are going to fetch the records anyway it is better to # check collection.length.zero?. def empty?