amatsuda/kaminari — pull request #320 by bricker88 (2012-12-11 02:04:23+00:00)
Title: Fix coercion error when offset_value is nil

This commit does two things:

* Adds `.offset(0)` when limit is set to `nil` for consistency
* Force-returns `1` for `#total_pages` and `#current_page` when
using `per(nil)`. This avoids "Cannot coerce nil into Fixnum"
errors, and will also prevent "ZeroDivisionError" if
`limit_value` is ever typecast using `to_i`.