davidcelis/api-pagination — pull request #9 by kamui (2014-05-01 05:48:15+00:00)
Title: Add support for Sequel and will_paginate

The sequel orm has it's own `#pagination` method. `will_paginate` doesn't override or wrap this method, it instead just uses the built in sequel pagination method. However, sequel's `#paginate` has a different method signature, instead of a hash or named parameters, it looks like this:

```ruby
def paginate(page_no, page_size, record_count=nil)
# ...
end
```

I couldn't think of a cleaner way to support Sequel, so what it does is check to see if `collections` inherits from `Sequel::Dataset` and if it does, it'll call `#paginate` with Sequel's method signature. If you have a better way to implement this, let me know and I'll do my best to modify this PR.