1
0
Fork 0
mirror of https://github.com/kaminari/kaminari.git synced 2022-11-09 13:44:37 -05:00
Commit graph

24 commits

Author SHA1 Message Date
Akira Matsuda
8c736ceb2a count + distinct: true won't work under AR 3.0 2013-11-10 03:42:41 +09:00
Akira Matsuda
b9ad9bc5a6 Skip the whole test when the version doesn't match
from @eitoball's comment: https://github.com/amatsuda/kaminari/pull/449#issuecomment-26684361
2013-11-10 03:31:50 +09:00
Whitney Young
06fec65983 Tests targeting Rails < 4.1 rather than ~> 4.0.0 2013-11-05 09:22:56 -03:00
Whitney Young
bcb39fa03d Fixed tests targeting Rails ~> 4.0.0. 2013-11-05 09:22:56 -03:00
Bryan Ricker
a821a9ecd7 Fix arity problem with rails 4.1.0
Fix specs for airty check

Don't check arity, just check the AR version
2013-11-05 09:20:11 -03:00
Akira Matsuda
caa11f6626 Failing spec for AR4 + custom select + count
refs #409
2013-08-29 18:42:03 +09:00
Yuki Nishijima
03fe8ba9b0 Use default_per_page value when per(nil)
closes #356
2013-06-18 22:37:33 +09:00
Yuki Nishijima
d79c94626c Revert "Merge pull request #304 from bricker88/nil_for_per"
This reverts commit 38fb04fab3, reversing
changes made to 992fb9f935.

Conflicts:

	README.rdoc
	spec/models/active_record/scopes_spec.rb
2013-06-18 22:30:05 +09:00
Yuki Nishijima
0a20c22aed Revert "Merge pull request #320 from bricker/fix_nil_math_errors"
This reverts commit d63ac017a9, reversing
changes made to f77fae765a.

Conflicts:

	lib/kaminari/models/page_scope_methods.rb
	spec/models/active_record/scopes_spec.rb
2013-06-18 22:24:42 +09:00
Yuki Nishijima
8e48e45aa5 Add #out_of_range? method
closes #306, and closes #366
2013-06-18 22:10:43 +09:00
Yuki Nishijima
2ac0c19a64 Add next_page and prev_page methods
closes #237
2013-06-17 17:50:11 +09:00
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