Sha256: 7a5ef384dc35c446cf1609ff5f70a9b8ee5d153271113298a975705914a7746f
Contents?: true
Size: 334 Bytes
Versions: 35
Compression:
Stored size: 334 Bytes
Contents
# frozen_string_literal: true module Motor module ApiQuery module Paginate MAX_PER_PAGE = 500 module_function def call(rel, params) params ||= {} rel = rel.limit([MAX_PER_PAGE, (params[:limit] || MAX_PER_PAGE).to_i].min) rel.offset(params[:offset].to_i) end end end end
Version data entries
35 entries across 35 versions & 1 rubygems