module Pagy::ArelExtra

def pagy_arel(collection, vars = {})

Return Pagy object and paginated collection/results
def pagy_arel(collection, vars = {})
  pagy = Pagy.new(pagy_arel_get_vars(collection, vars))
  [pagy, pagy_get_items(collection, pagy)]
end