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