Method: ModelSet::SQLQuery#count
- Defined in:
- lib/model_set/sql_query.rb
#count ⇒ Object
95 96 97 |
# File 'lib/model_set/sql_query.rb', line 95 def count @count ||= limit ? aggregate("COUNT(DISTINCT #{id_field_with_prefix})").to_i : size end |