prismicio-community/ruby-kit

Kaminari Pagination

Closed this issue · 1 comments

I use Kaminari for pagination. A simple monkeypatch helped get the results to work correctly:

module Prismic
  class Documents
    def current_page
      @page
    end
    def limit_value
      @results_per_page
    end
  end
end

Might be good to bake in. Thanks!

Damn, I just managed to make it work with our starter kit, and it's pretty damn awesome indeed!!

My 10-line pagination just turned into 1 line... \o/

Can you check out the PR #40? Let's continue that conversation over there!