Method: ActiveRecord::Relation#size
- Defined in:
- activerecord/lib/active_record/relation.rb
#size ⇒ Object
Returns size of the records.
353 354 355 356 357 358 359 |
# File 'activerecord/lib/active_record/relation.rb', line 353 def size if loaded? records.length else count(:all) end end |