Module: Upmin::Paginator
- Defined in:
- lib/upmin/paginator.rb
Class Method Summary collapse
Class Method Details
.paginate(chain, page = 1, per_page = 30) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/upmin/paginator.rb', line 4 def Paginator.paginate(chain, page = 1, per_page = 30) if defined?(WillPaginate) # Ignore per page for now - just use the will_paginate default return chain.paginate(page: page.to_i, per_page: per_page) else # Use Kaminari return chain.page(page).per(per_page) end end |