Skip to content
Browse files

Convert options[:per_page] to integer as GSL is monkeypatching Fixnum…

… causing an exception here.
  • Loading branch information...
1 parent d8d50f4 commit f4bc520fa3ce49a64f6f778ce2452215f8eef86c @TomK32 TomK32 committed Feb 8, 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 f4bc520

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