Sha256: 87cfae463348589e3f62fed8cfd6e60aadf670676da93d4710e08eec6cfafd2f

Contents?: true

Size: 591 Bytes

Versions: 36

Compression:

Stored size: 591 Bytes

Contents

# frozen_string_literal: true
module Blacklight::Solr::Response::PaginationMethods
  include Kaminari::PageScopeMethods
  include Kaminari::ConfigurationMethods::ClassMethods

  def limit_value #:nodoc:
    rows
  end

  def offset_value #:nodoc:
    start
  end

  def total_count #:nodoc:
    total
  end

  ##
  # Should return response documents size, not hash size
  def size
    total_count
  end

  ##
  # Meant to have the same signature as Kaminari::PaginatableArray#entry_name
  def entry_name(options)
    I18n.t('blacklight.entry_name.default', count: options[:count])
  end
end

Version data entries

36 entries across 36 versions & 2 rubygems

Version Path
blacklight-7.40.0 lib/blacklight/solr/response/pagination_methods.rb
blacklight-7.39.0 lib/blacklight/solr/response/pagination_methods.rb
blacklight-7.38.0 lib/blacklight/solr/response/pagination_methods.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-7.37.0/lib/blacklight/solr/response/pagination_methods.rb
blacklight-7.37.0 lib/blacklight/solr/response/pagination_methods.rb
blacklight-7.36.2 lib/blacklight/solr/response/pagination_methods.rb
blacklight-7.36.1 lib/blacklight/solr/response/pagination_methods.rb
blacklight-7.36.0 lib/blacklight/solr/response/pagination_methods.rb
blacklight-7.35.0 lib/blacklight/solr/response/pagination_methods.rb
blacklight-7.34.0 lib/blacklight/solr/response/pagination_methods.rb
blacklight-7.33.1 lib/blacklight/solr/response/pagination_methods.rb
blacklight-7.33.0 lib/blacklight/solr/response/pagination_methods.rb
blacklight-7.32.0 lib/blacklight/solr/response/pagination_methods.rb
blacklight-7.31.0 lib/blacklight/solr/response/pagination_methods.rb
blacklight-7.30.0 lib/blacklight/solr/response/pagination_methods.rb
blacklight-7.29.0 lib/blacklight/solr/response/pagination_methods.rb
blacklight-7.28.0 lib/blacklight/solr/response/pagination_methods.rb
blacklight-7.27.1 lib/blacklight/solr/response/pagination_methods.rb
blacklight-7.27.0 lib/blacklight/solr/response/pagination_methods.rb
blacklight-7.26.1 lib/blacklight/solr/response/pagination_methods.rb