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