Sha256: 5a5b73eecd3e741812fb01710565d8665d73d1e5de28d3b36e7fe5d6fa599e3c

Contents?: true

Size: 511 Bytes

Versions: 10

Compression:

Stored size: 511 Bytes

Contents

require 'paginator'

class Paginator

  # Total number of pages
  def number_of_pages_with_infinite
    number_of_pages_without_infinite unless infinite?
  end
  alias_method_chain :number_of_pages, :infinite
  
  # Is this an "infinite" paginator
  def infinite?
    @count.nil?
  end
  
  class Page
    # Checks to see if there's a page after this one
    def next_with_infinite?
      return true if @pager.infinite?
      next_without_infinite?
    end
    alias_method_chain :next?, :infinite
  end

end

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
brisk-bills-0.8.2 vendor/plugins/active_scaffold/lib/extensions/paginator_extensions.rb
brisk-bills-0.8.1 vendor/plugins/active_scaffold/lib/extensions/paginator_extensions.rb
active_scaffold_vho-3.0.9 lib/extensions/paginator_extensions.rb
active_scaffold_vho-3.0.8 lib/extensions/paginator_extensions.rb
active_scaffold_vho-3.0.7 lib/extensions/paginator_extensions.rb
active_scaffold_vho-3.0.6 lib/extensions/paginator_extensions.rb
active_scaffold-3.0.4 lib/extensions/paginator_extensions.rb
active_scaffold-3.0.2 lib/extensions/paginator_extensions.rb
active_scaffold-3.0.1 lib/extensions/paginator_extensions.rb
active_scaffold-3.0.0 lib/extensions/paginator_extensions.rb