module WillPaginate::Mongoid::CollectionMethods

Attributes

current_page[R]

Public Instance Methods

offset() click to toggle source
# File lib/will_paginate/mongoid.rb, line 41
def offset
  @page_multiplier * per_page
end
total_entries() click to toggle source
# File lib/will_paginate/mongoid.rb, line 33
def total_entries
  @total_entries ||= count
end
total_pages() click to toggle source
# File lib/will_paginate/mongoid.rb, line 37
def total_pages
  (total_entries / per_page.to_f).ceil
end