Sha256: 31a5e27f168006f471d9abaa983b87876edfc0726c47c37db9e127d34b9a0fc2
Contents?: true
Size: 453 Bytes
Versions: 9
Compression:
Stored size: 453 Bytes
Contents
# frozen_string_literal: true module Trailblazer class Finder module Adapters # ActiveRecord Adapter module Basic # Basic Paging Adapter module Paging module_function def set_paging_handler lambda do |current_page, per_page, entity| entity.drop(([current_page, 1].max - 1) * per_page).first(per_page) end end end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems