From 48acd29adbd86cec54eec6760dd317f4901125aa Mon Sep 17 00:00:00 2001 From: Francesco Rodriguez Date: Fri, 18 May 2012 01:15:41 -0500 Subject: [PATCH] remove incorrect example of CollectionAssociation#empty? --- .../associations/collection_association.rb | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/activerecord/lib/active_record/associations/collection_association.rb b/activerecord/lib/active_record/associations/collection_association.rb index 7ee942d153933..9abe648708bbb 100644 --- a/activerecord/lib/active_record/associations/collection_association.rb +++ b/activerecord/lib/active_record/associations/collection_association.rb @@ -313,23 +313,6 @@ def length # person.pets.delete_all # person.pets.count # => 0 # person.pets.empty? # => true - # - # Also, you can pass a block to define a criteria. The behaviour - # is the same, it returns true if the collection based on the - # criteria is empty. - # - # person.pets - # # => [#] - # - # person.pets.empty? do |pet| - # pet.group == 'cats' - # end - # # => false - # - # person.pets.empty? do |pet| - # pet.group == 'dogs' - # end - # # => true def empty? size.zero? end