Skip to content
Browse files

Merge pull request #3 from TomK32/patch-1

Convert options[:per_page] to integer
  • Loading branch information...
2 parents d8d50f4 + f4bc520 commit d27a6f41c07c705d5f842536a0b9815fe04dd4fe @lucasas committed Feb 15, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/will_paginate_mongoid/mongoid_paginator.rb
View
2 lib/will_paginate_mongoid/mongoid_paginator.rb
@@ -18,7 +18,7 @@ def self.paginate(options = {})
def self.base_options(options)
options[:page] ||= 1
options[:per_page] ||= 10
- options[:offset] = (options[:page].to_i - 1) * options[:per_page]
+ options[:offset] = (options[:page].to_i - 1) * options[:per_page].to_i
options
end

0 comments on commit d27a6f4

Please sign in to comment.
Something went wrong with that request. Please try again.