Module: ActiveScaffold::Paginator
- Defined in:
- lib/active_scaffold/extensions/paginator_extensions.rb
Instance Method Summary collapse
- #count ⇒ Object
-
#infinite? ⇒ Boolean
Is this an “infinite” paginator.
-
#number_of_pages ⇒ Object
Total number of pages.
Instance Method Details
#count ⇒ Object
17 18 19 |
# File 'lib/active_scaffold/extensions/paginator_extensions.rb', line 17 def count @count || first.items.size end |
#infinite? ⇒ Boolean
Is this an “infinite” paginator
13 14 15 |
# File 'lib/active_scaffold/extensions/paginator_extensions.rb', line 13 def infinite? @count.nil? end |
#number_of_pages ⇒ Object
Total number of pages
8 9 10 |
# File 'lib/active_scaffold/extensions/paginator_extensions.rb', line 8 def number_of_pages super if @count end |