This method is deprecated or moved on the latest stable version.
The last existing version (v5.0.0.1) is shown here.
length()
public
Returns the size
of the collection calling size
on the target.
If the collection has been already loaded length
and size
are equivalent. If not and you are going to need the records anyway this
method will take
one less query. Otherwise size
is more efficient.
# File activerecord/lib/active_record/associations/collection_association.rb, line 330
def length
load_target.size
end