1
0
Fork 0
mirror of https://github.com/kaminari/kaminari.git synced 2022-11-09 13:44:37 -05:00
kaminari--kaminari/spec
Bryan Ricker 873dcf9a90 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 avoid "Cannot coerce nil into Fixnum"
errors, and will also prevent "ZeroDivisionError" if
`limit_value` is ever typecast using `to_i`.
2012-12-10 18:02:56 -08:00
..
config Add tests for max_pages and max_pages_per 2012-10-22 16:16:54 +02:00
fake_app log to fake_app/log directory 2012-05-24 15:20:26 +09:00
helpers fix issue#276 2012-09-03 01:00:31 +09:00
models Fix coercion error when offset_value is nil 2012-12-10 18:02:56 -08:00
requests depend entirely on database_cleaner 2012-05-23 12:33:56 +09:00
support mongoid and mongo_mapper doesn't support transaction strategy 2012-05-23 12:38:30 +09:00
fake_gem.rb refactor AR, DM, mongoid, and mongo_mapper specs 2012-05-23 12:44:13 +09:00
spec_helper.rb compatible for capybara-2.0.0 later. 2012-11-26 22:43:59 +09:00
spec_helper_for_sinatra.rb compatible for capybara-2.0.0 later. 2012-11-26 22:43:59 +09:00