Sha256: 393e8c6a28e5390a1fac5c88ce66737467c2ad6176f68cd7eee842ea39f08621
Contents?: true
Size: 363 Bytes
Versions: 17
Compression:
Stored size: 363 Bytes
Contents
# frozen_string_literal: true module Comfy::Paginate # Wrapper to deal with WillPaginate vs Kaminari nonsense def comfy_paginate(scope, per_page: 50) if defined?(WillPaginate) scope.paginate(page: params[:page], per_page: per_page) elsif defined?(Kaminari) scope.page(params[:page]).per(per_page) else scope end end end
Version data entries
17 entries across 17 versions & 6 rubygems