Module: Archangel::Controllers::PaginatableConcern

Extended by:
ActiveSupport::Concern
Included in:
ApplicationController
Defined in:
app/controllers/concerns/archangel/controllers/paginatable_concern.rb

Overview

Controller pagination concern

Instance Method Summary collapse

Instance Method Details

#page_numInteger

Current page number


32
33
34
# File 'app/controllers/concerns/archangel/controllers/paginatable_concern.rb', line 32

def page_num
  params.fetch(Kaminari.config.param_name, 1).to_i
end

#per_pageInteger

Record limt count


23
24
25
# File 'app/controllers/concerns/archangel/controllers/paginatable_concern.rb', line 23

def per_page
  params.fetch(:per, per_page_default).to_i
end