Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v1.2.6) is shown here.
page_count()
public
Returns the number of pages in this paginator.
Show source
def page_count
@page_count ||= @item_count.zero? ? 1 :
(q,r=@item_count.divmod(@items_per_page); r==0? q : q+1)
end