Module: ActiveScaffold::Paginator

Defined in:
lib/active_scaffold/extensions/paginator_extensions.rb

Instance Method Summary collapse

Instance Method Details

#countObject



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

Returns:

  • (Boolean)


11
12
13
# File 'lib/active_scaffold/extensions/paginator_extensions.rb', line 11

def infinite?
  @count.nil?
end

#number_of_pagesObject

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