Module: BootstrapPager::DataMapperCollectionMethods

Defined in:
lib/bootstrap_pager/models/data_mapper_collection_methods.rb

Instance Method Summary collapse

Instance Method Details

#limit_valueObject

:nodoc:


3
4
5
# File 'lib/bootstrap_pager/models/data_mapper_collection_methods.rb', line 3

def limit_value #:nodoc:
  query.options[:limit] || 0
end

#offset_valueObject

:nodoc:


7
8
9
# File 'lib/bootstrap_pager/models/data_mapper_collection_methods.rb', line 7

def offset_value #:nodoc:
  query.options[:offset] || 0
end

#total_countObject

:nodoc:


11
12
13
# File 'lib/bootstrap_pager/models/data_mapper_collection_methods.rb', line 11

def total_count #:nodoc:
  model.count(query.options.except(:limit, :offset, :order))
end