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