Module: ActiveScaffold::Page

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

Instance Method Summary collapse

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


26
27
28
29
30
31
32
# File 'lib/active_scaffold/extensions/paginator_extensions.rb', line 26

def empty?
  if @pager.infinite?
    items.to_a.empty?
  else
    @pager.count.zero?
  end
end

#next?Boolean

Checks to see if there’s a page after this one

Returns:

  • (Boolean)


22
23
24
# File 'lib/active_scaffold/extensions/paginator_extensions.rb', line 22

def next?
  @pager.infinite? || super
end