Module: ActiveAdmin::Resource::Pagination

Included in:
ActiveAdmin::Resource
Defined in:
lib/active_admin/resource/pagination.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#max_per_pageObject

The default number of records to display per page


10
11
12
# File 'lib/active_admin/resource/pagination.rb', line 10

def max_per_page
  @max_per_page
end

#paginateObject

Enable / disable pagination (defaults to true)


13
14
15
# File 'lib/active_admin/resource/pagination.rb', line 13

def paginate
  @paginate
end

#per_pageObject

The default number of records to display per page


7
8
9
# File 'lib/active_admin/resource/pagination.rb', line 7

def per_page
  @per_page
end

Instance Method Details

#initialize(*args) ⇒ Object


15
16
17
18
19
20
# File 'lib/active_admin/resource/pagination.rb', line 15

def initialize(*args)
  super
  @paginate = true
  @per_page = namespace.default_per_page
  @max_per_page = namespace.max_per_page
end