Module: ActiveAdmin::Resource::Pagination
- Included in:
- ActiveAdmin::Resource
- Defined in:
- lib/active_admin/resource/pagination.rb
Instance Attribute Summary collapse
-
#max_per_page ⇒ Object
The default number of records to display per page.
-
#paginate ⇒ Object
Enable / disable pagination (defaults to true).
-
#per_page ⇒ Object
The default number of records to display per page.
Instance Method Summary collapse
Instance Attribute Details
#max_per_page ⇒ Object
The default number of records to display per page
11 12 13 |
# File 'lib/active_admin/resource/pagination.rb', line 11 def max_per_page @max_per_page end |
#paginate ⇒ Object
Enable / disable pagination (defaults to true)
14 15 16 |
# File 'lib/active_admin/resource/pagination.rb', line 14 def paginate @paginate end |
#per_page ⇒ Object
The default number of records to display per page
8 9 10 |
# File 'lib/active_admin/resource/pagination.rb', line 8 def per_page @per_page end |
Instance Method Details
#initialize(*args) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/active_admin/resource/pagination.rb', line 16 def initialize(*args) super @paginate = true @per_page = namespace.default_per_page @max_per_page = namespace.max_per_page end |