Sha256: 38b806a2fca27847ef6b5a097f1b4d4bd72ba2c82fb49578ea15a2619ee33f00
Contents?: true
Size: 337 Bytes
Versions: 5
Compression:
Stored size: 337 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
5 entries across 5 versions & 1 rubygems