Sha256: 936b5f6c99e9c75b1f409372ae8127b901c623f9e322255d7d6f8999493ea466

Contents?: true

Size: 309 Bytes

Versions: 12

Compression:

Stored size: 309 Bytes

Contents

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

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
kaminari-0.15.1 lib/kaminari/models/data_mapper_collection_methods.rb
kaminari-0.15.0 lib/kaminari/models/data_mapper_collection_methods.rb
kaminari-rails4-0.15.0 lib/kaminari/models/data_mapper_collection_methods.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/kaminari-0.14.1/lib/kaminari/models/data_mapper_collection_methods.rb
kaminari-0.14.1 lib/kaminari/models/data_mapper_collection_methods.rb
kaminari-0.14.0 lib/kaminari/models/data_mapper_collection_methods.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/kaminari-0.13.0/lib/kaminari/models/data_mapper_collection_methods.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/kaminari-0.13.0/lib/kaminari/models/data_mapper_collection_methods.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/kaminari-0.13.0/lib/kaminari/models/data_mapper_collection_methods.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/kaminari-0.13.0/lib/kaminari/models/data_mapper_collection_methods.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/kaminari-0.13.0/lib/kaminari/models/data_mapper_collection_methods.rb
kaminari-0.13.0 lib/kaminari/models/data_mapper_collection_methods.rb