negipo
15ea8867c9
Add failing tests with padding
2013-04-14 21:32:46 +09:00
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
Akira Matsuda
38fb04fab3
Merge pull request #304 from bricker88/nil_for_per
...
Allow nil for #per, to return records without limit (like ActiveRelation#limit)
2012-11-26 05:31:28 -08:00
Bryan Ricker
949f345a50
Allow nil for #per, to return records without limit
2012-10-31 18:02:52 -07:00
Zbigniew Pieslak
13bc89a554
Add tests for max_pages and max_pages_per
2012-10-22 16:16:54 +02:00
Akira Matsuda
db0e17fd39
Ruby 1️⃣ . 8️⃣
2012-09-20 10:15:40 +09:00
Akira Matsuda
0e86151b1a
we're still supporting Ruby 1.8...
2012-09-20 10:05:05 +09:00
Ben Simpson
35252fa201
Stripping options for ActiveSupport::OrderedHash
2012-09-19 09:45:56 -04:00
Ben Simpson
83b1ff13e3
Allow count, total count to pass parameters to super
2012-09-19 09:45:28 -04:00
Keiko Oda
c77867681e
Add max_per_page configuration option
2012-08-27 22:15:19 -07:00
Akira Matsuda
e79935c2d5
num_pages => total_pages
2012-05-25 15:31:53 +09:00
Akira Matsuda
854d04af4b
[AR, DM, Mongoid, MongoMapper].each {|orm| run orm specs only if orm is loaded }
2012-05-23 12:38:30 +09:00
Akira Matsuda
53bae068e8
categorize model specs
2012-05-23 12:35:38 +09:00