instance method
size
Ruby on Rails 7.0.10
Since v3.0.20Signature
size()
Returns size of the records.
Source
# File activerecord/lib/active_record/relation.rb, line 260
def size
if loaded?
records.length
else
count(:all)
end
end
Defined in activerecord/lib/active_record/relation.rb line 260
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Relation