Skip to content

Commit

Permalink
Merge pull request #3 from TomK32/patch-1
Browse files Browse the repository at this point in the history
Convert options[:per_page] to integer
  • Loading branch information
lucasas committed Feb 15, 2012
2 parents d8d50f4 + f4bc520 commit d27a6f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/will_paginate_mongoid/mongoid_paginator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit d27a6f4

Please sign in to comment.