Skip to content

Releases: davidcelis/api-pagination

5.0.0

26 Oct 17:10
Compare
Choose a tag to compare

This release fixes issues with using newer versions of Pagy, due to them renaming Pagy::VARS to Pagy::DEFAULT. Consequently, support for older versions of Pagy is dropped.

4.8.2

07 Dec 23:41
Compare
Choose a tag to compare

This release fixes an incompatibility with Grape 1.2. Thanks to @fotos for this fix!

4.8.1

25 Jun 17:57
Compare
Choose a tag to compare

4.8.1

  • Added support for the Pagy gem

4.7.1

25 Apr 17:43
Compare
Choose a tag to compare

Add an :enforce_max_per_page option to pagination in Grape APIs:

class MoviesAPI < Grape::API
  format :json

  desc 'Return a paginated set of movies'
  paginate per_page: 25, max_per_page: 100, enforce_max_per_page: true
  get do
    # If a client tries to make a request with a `per_page` param that is above 100,
    # no movies will be returned. Instead, a client error will be returned.
    paginate Movie.all
  end
end

4.7.0

11 Jan 18:16
Compare
Choose a tag to compare

This release allows users to configure a hardcoded base URL for pagination links in the case where your application is reachable at multiple URLs and, for example, caching is used. If your application is only available at specific hostnames for specific users, caching these headers can lead to unexpected results. You can set a base URL using the following configuration:

ApiPagination.configure do |config|
  # Hardcode a URL to use in your pagination links (without a trailing slash)
  config.base_url = 'https://example.com'
end

4.6.3

28 May 18:56
Compare
Choose a tag to compare

Fix a regression that broke compatibility with multi-word classes (#84)

4.6.2

28 May 18:55
Compare
Choose a tag to compare

Removes a superfluous database query (#82)

4.6.1

22 May 17:30
Compare
Choose a tag to compare

Fixes an issue with will_paginate where unsupported options were passed

4.6.0

21 May 01:20
Compare
Choose a tag to compare
  • Fix behavior related to a new implementation of last_page? in Kaminari (#78)
  • Allow passing additional options to paginate when using will_paginate (#81)

4.5.2

29 Dec 15:41
Compare
Choose a tag to compare

Fix an issue where Total headers supplied as non-String values would cause exceptions in Rack