Sha256: 4c8f224f20170bc93b40e2f19c8e91cf8c54d87274af464ff8e91f902c5c94a2
Contents?: true
Size: 523 Bytes
Versions: 2
Compression:
Stored size: 523 Bytes
Contents
require 'active_scaffold/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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
active_scaffold-3.0.12 | lib/extensions/paginator_extensions.rb |
active_scaffold-3.0.11 | lib/extensions/paginator_extensions.rb |