Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

… causing an exception here.
  • Loading branch information...
commit f4bc520fa3ce49a64f6f778ce2452215f8eef86c 1 parent d8d50f4
@TomK32 TomK32 authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.