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