module WillPaginate::Mongoid::CollectionMethods

Attributes

current_page[R]

Public Instance Methods

offset() click to toggle source
# File lib/rasti/paginate/mongoid.rb, line 39
def offset
  @page_multiplier * per_page
end
total_entries() click to toggle source
# File lib/rasti/paginate/mongoid.rb, line 31
def total_entries
  @total_entries ||= count
end
total_pages() click to toggle source
# File lib/rasti/paginate/mongoid.rb, line 35
def total_pages
  (total_entries / per_page.to_f).ceil
end