Sha256: 603173e2a8310f06004576a8ccf57bc4d5639da074ff9a5fbe2cda877814899c
Contents?: true
Size: 332 Bytes
Versions: 10
Compression:
Stored size: 332 Bytes
Contents
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
10 entries across 10 versions & 1 rubygems