Module: Kaminari::ActiveRecordRelationMethods::InstanceMethods

Defined in:
lib/kaminari/models/active_record_relation_methods.rb

Instance Method Summary collapse

Instance Method Details

#total_countObject

:nodoc:



5
6
7
8
9
# File 'lib/kaminari/models/active_record_relation_methods.rb', line 5

def total_count #:nodoc:
  c = except(:offset, :limit).count
  # .group returns an OrderdHash that responds to #count
  c.respond_to?(:count) ? c.count : c
end