mirror of
https://github.com/kaminari/kaminari.git
synced 2022-11-09 13:44:37 -05:00
15 lines
309 B
Ruby
15 lines
309 B
Ruby
module Kaminari
|
|
module DataMapperCollectionMethods
|
|
def limit_value #:nodoc:
|
|
query.options[:limit] || 0
|
|
end
|
|
|
|
def offset_value #:nodoc:
|
|
query.options[:offset] || 0
|
|
end
|
|
|
|
def total_count #:nodoc:
|
|
model.count(query.options.except(:limit, :offset, :order))
|
|
end
|
|
end
|
|
end
|