diff options
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/associations/collection_association.rb | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/activerecord/lib/active_record/associations/collection_association.rb b/activerecord/lib/active_record/associations/collection_association.rb index 7ee942d153..9abe648708 100644 --- a/activerecord/lib/active_record/associations/collection_association.rb +++ b/activerecord/lib/active_record/associations/collection_association.rb @@ -313,23 +313,6 @@ module ActiveRecord # 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 - # # => [#<Pet name: "Wy", group: "cats">] - # - # 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 |