Sha256: 1184925b6b6e60c74976a901da40d0b58c0b882db67b3e26217b847d934eb187
Contents?: true
Size: 357 Bytes
Versions: 8
Compression:
Stored size: 357 Bytes
Contents
module PolyglotIos module Helper module Depaginate PER_PAGE = 100 def depaginate_query(query) depaginated_array = [] page = query.page(1).per(PER_PAGE).all until page.nil? depaginated_array += page page = page.pages.next end depaginated_array end end end end
Version data entries
8 entries across 8 versions & 1 rubygems