Flowdock
method

empty?

Importance_1
Ruby on Rails latest stable (v4.1.8) - 0 notes - Class: CollectionAssociation
empty?() public

Returns true if the collection is empty.

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 loaded and you are going to fetch the records anyway it is better to check collection.length.zero?.

Show source
Register or log in to add new notes.