Sha256: 4b314ab9c339449b4cba469c04c8a2eb5b31ead13c124c3b8fc8ba8ac3aa4a73

Contents?: true

Size: 315 Bytes

Versions: 7

Compression:

Stored size: 315 Bytes

Contents

module BootstrapPager
  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

7 entries across 7 versions & 1 rubygems

Version Path
bootstrap_pager-0.11.0 lib/bootstrap_pager/models/data_mapper_collection_methods.rb
bootstrap_pager-0.10.1 lib/bootstrap_pager/models/data_mapper_collection_methods.rb
bootstrap_pager-0.10.0 lib/bootstrap_pager/models/data_mapper_collection_methods.rb
bootstrap_pager-0.9.3 lib/bootstrap_pager/models/data_mapper_collection_methods.rb
bootstrap_pager-0.9.2 lib/bootstrap_pager/models/data_mapper_collection_methods.rb
bootstrap_pager-0.9.1 lib/bootstrap_pager/models/data_mapper_collection_methods.rb
bootstrap_pager-0.9.0 lib/bootstrap_pager/models/data_mapper_collection_methods.rb