Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1 from fortnightlabs/mongoid

A few more methods from `WillPaginate::CollectionMethods`
  • Loading branch information...
commit 29977a640383ce698ddfd4fa6be225fad408ad8e 2 parents 4438f09 + 78037cc
@dbackeus dbackeus authored
Showing with 1 addition and 4 deletions.
  1. +1 −4 lib/will_paginate/mongoid.rb
View
5 lib/will_paginate/mongoid.rb
@@ -22,16 +22,13 @@ def page(page)
end
module CollectionMethods
+ include WillPaginate::CollectionMethods
attr_reader :current_page
def total_entries
@total_entries ||= count
end
- def total_pages
- (total_entries / per_page.to_f).ceil
- end
-
def offset
@page_multiplier * per_page
end
Please sign in to comment.
Something went wrong with that request. Please try again.