Sha256: dd564fc22e812e1c4e4abdf54da1908a083d5ae682203d29f1872e4c02d5507a

Contents?: true

Size: 486 Bytes

Versions: 24

Compression:

Stored size: 486 Bytes

Contents

require 'kaminari/models/plucky_criteria_methods'

module Kaminari
  module MongoMapperExtension
    module Document
      extend ActiveSupport::Concern
      include Kaminari::ConfigurationMethods

      included do
        # Fetch the values at the specified page number
        #   Model.page(5)
        scope Kaminari.config.page_method_name, Proc.new {|num|
          limit(default_per_page).offset(default_per_page * ([num.to_i, 1].max - 1))
        }
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 8 rubygems

Version Path
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/kaminari-0.17.0/lib/kaminari/models/mongo_mapper_extension.rb
kaminari-0.17.0 lib/kaminari/models/mongo_mapper_extension.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/kaminari-0.16.3/lib/kaminari/models/mongo_mapper_extension.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/kaminari-0.16.3/lib/kaminari/models/mongo_mapper_extension.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/kaminari-0.16.3/lib/kaminari/models/mongo_mapper_extension.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/kaminari-0.16.3/lib/kaminari/models/mongo_mapper_extension.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/kaminari-0.16.3/lib/kaminari/models/mongo_mapper_extension.rb
shoppe-paypal-1.1.0 vendor/bundle/ruby/2.1.0/gems/kaminari-0.16.3/lib/kaminari/models/mongo_mapper_extension.rb
kaminari-0.16.3 lib/kaminari/models/mongo_mapper_extension.rb
kaminari-0.16.2 lib/kaminari/models/mongo_mapper_extension.rb
kaminari-0.16.1 lib/kaminari/models/mongo_mapper_extension.rb
kaminari-0.16.0 lib/kaminari/models/mongo_mapper_extension.rb
kaminari-0.15.1 lib/kaminari/models/mongo_mapper_extension.rb
kaminari-0.15.0 lib/kaminari/models/mongo_mapper_extension.rb
kaminari-rails4-0.15.0 lib/kaminari/models/mongo_mapper_extension.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/kaminari-0.14.1/lib/kaminari/models/mongo_mapper_extension.rb
kaminari-0.14.1 lib/kaminari/models/mongo_mapper_extension.rb
kaminari-0.14.0 lib/kaminari/models/mongo_mapper_extension.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/kaminari-0.13.0/lib/kaminari/models/mongo_mapper_extension.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/kaminari-0.13.0/lib/kaminari/models/mongo_mapper_extension.rb