Module: Occams::Paginate

Included in:
Admin::BaseController
Defined in:
app/controllers/concerns/occams/paginate.rb

Instance Method Summary collapse

Instance Method Details

#occams_paginate(scope, per_page: 50) ⇒ Object



4
5
6
7
8
# File 'app/controllers/concerns/occams/paginate.rb', line 4

def occams_paginate(scope, per_page: 50)
  return unless defined?(Kaminari)

  scope.page(params[:page]).per(per_page)
end