Sha256: 92393d1eecbecbd32a8b93f46204aa1690d2b2c2819b3fd89e54f2ca4e76049d

Contents?: true

Size: 341 Bytes

Versions: 6

Compression:

Stored size: 341 Bytes

Contents

module Paginator
    extend ActiveSupport::Concern
    module ClassMethods
      def list(per_page = DEFAULT_PER_PAGE, page = nil)
        paginated_list = {}
        per_page = DEFAULT_PER_PAGE if per_page == 0
        paginated_list[:list] = self.page(page || 1).per(per_page)
        FilteredList.new(paginated_list)
      end
    end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cm-graphql-0.0.7 app/models/concerns/paginator.rb
cm-graphql-0.0.6 app/models/concerns/paginator.rb
cm-graphql-0.0.5 app/models/concerns/paginator.rb
cm-graphql-0.0.3 app/models/concerns/paginator.rb
cm-graphql-0.0.2 app/models/concerns/paginator.rb
cm-graphql-0.0.1 app/models/concerns/paginator.rb