Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Convert options[:per_page] to integer #3

Merged
merged 1 commit into from

2 participants

@TomK32

GSL is monkeypatching Fixnum and causing an exception here.

That's the offending line in GSL but I think paginate has to be fixed anyways.
https://github.com/romanbsd/rb-gsl/blob/master/lib/gsl/oper.rb#L15

@lucasas lucasas merged commit d27a6f4 into from
@lucasas
Owner

Thank you for the patch. As soon as possible I'll bump the version and push to RubyGems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 8, 2012
  1. @TomK32

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

    TomK32 authored
    … causing an exception here.
This page is out of date. Refresh to see the latest.
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
Something went wrong with that request. Please try again.