Sha256: ac4e0c38a04ca3282c3a61ca31a539e8fe33582a9da6a5304d6b8288b79ba0f2

Contents?: true

Size: 442 Bytes

Versions: 21

Compression:

Stored size: 442 Bytes

Contents

module Godmin
  module Resources
    module ResourceService
      module Pagination
        extend ActiveSupport::Concern

        def apply_pagination(page_param, resources)
          @paginator = Paginator.new(resources, per_page: per_page, current_page: page_param)
          @paginator.paginate
        end

        def paginator
          @paginator
        end

        def per_page
          25
        end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
godmin-2.3.0 lib/godmin/resources/resource_service/pagination.rb
godmin-2.2.2 lib/godmin/resources/resource_service/pagination.rb
godmin-2.2.1 lib/godmin/resources/resource_service/pagination.rb
godmin-2.2.0 lib/godmin/resources/resource_service/pagination.rb
godmin-2.1.0 lib/godmin/resources/resource_service/pagination.rb
godmin-2.0.0 lib/godmin/resources/resource_service/pagination.rb
godmin-1.5.0 lib/godmin/resources/resource_service/pagination.rb
godmin-1.4.0 lib/godmin/resources/resource_service/pagination.rb
godmin-1.3.1 lib/godmin/resources/resource_service/pagination.rb
godmin-1.3.0 lib/godmin/resources/resource_service/pagination.rb
godmin-1.2.0 lib/godmin/resources/resource_service/pagination.rb
godmin-1.1.0 lib/godmin/resources/resource_service/pagination.rb
godmin-1.0.0 lib/godmin/resources/resource_service/pagination.rb
godmin-0.12.4 lib/godmin/resources/resource_service/pagination.rb
godmin-0.12.3 lib/godmin/resources/resource_service/pagination.rb
godmin-0.12.2 lib/godmin/resources/resource_service/pagination.rb
godmin-0.12.1 lib/godmin/resources/resource_service/pagination.rb
godmin-0.12.0 lib/godmin/resources/resource_service/pagination.rb
godmin-0.11.2 lib/godmin/resources/resource_service/pagination.rb
godmin-0.11.1 lib/godmin/resources/resource_service/pagination.rb