diff options
author | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2012-05-18 01:15:41 -0500 |
---|---|---|
committer | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2012-05-18 01:15:41 -0500 |
commit | 48acd29adbd86cec54eec6760dd317f4901125aa (patch) | |
tree | 5457e920c11a0d80dbde45aa7e3d435ffc6d6ed0 /activerecord | |
parent | bf55f28af159ccfaa0bb8e5e0b52e50e14ede406 (diff) | |
download | rails-48acd29adbd86cec54eec6760dd317f4901125aa.tar.gz rails-48acd29adbd86cec54eec6760dd317f4901125aa.tar.bz2 rails-48acd29adbd86cec54eec6760dd317f4901125aa.zip |
remove incorrect example of CollectionAssociation#empty?
Diffstat (limited to 'activerecord')
-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 |