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
15 16 17 |
# File 'lib/active_scaffold/extensions/paginator_extensions.rb', line 15 def count @count || first.items.size end |
#infinite? ⇒ Boolean
Is this an “infinite” paginator
11 12 13 |
# File 'lib/active_scaffold/extensions/paginator_extensions.rb', line 11 def infinite? @count.nil? end |
#number_of_pages ⇒ Object
Total number of pages
6 7 8 |
# File 'lib/active_scaffold/extensions/paginator_extensions.rb', line 6 def number_of_pages super if @count end |