Akira Matsuda
4b2121e750
Would a PaginatableArray accept anything else truthy than a number for total_count?
2015-07-24 10:01:22 +09:00
Akira Matsuda
dadb9d249f
Readability
2015-07-24 09:42:46 +09:00
Yuki Nishijima
1fc1707acf
Prefer to use if
s over Array#max for performance
...
https://gist.github.com/yuki24/e8d89597efa0fbdfe775
2014-12-26 04:29:16 -08:00
Yuki Nishijima
21ad994d42
Regression for paginatable array
...
Sometimes, we want to make an array just paginatable without changing
its elements. Make it so if total count is explicitly given and it is
greater than the length of the given array. #516
2014-06-24 18:34:44 -07:00
Yuki Nishijima
29fdcfa886
Fix a bug that paginatable arrays with total_count option always returns whole array
...
Fixes #516
2014-05-06 20:04:16 -07:00
Yuki Nishijima
507fb73b09
Simplify page_entries_info by adding entry_name interface to each ORM
2014-03-16 11:21:26 -07:00
Yuki Nishijima
ed4e6f042b
Fix a bug that PaginatableArray#total_pages returns the wrong value
...
closes #416
2013-07-02 22:20:53 +09:00
Akira Matsuda
d45a762b5b
prefer extend over class << self; include; end
2012-10-15 22:17:53 +09:00
Akira Matsuda
93053d26ee
refactor page_entries_info not to use buggy current_page_count
method
2012-05-15 22:19:24 +09:00
Forrest Ye
6ad1e08e88
remove several trailing whitespaces
2012-05-14 23:45:33 +08:00
dblock
011adedfec
Fixing displayed number of items on each page w/ Mongoid 2.4.x and MongoMapper.
2012-01-11 13:38:45 -05:00
Akira Matsuda
7f563a4e24
why doesn't Kaminari.paginate_array accept options?
2011-12-22 07:56:10 +09:00
Akira Matsuda
3cf929f7d0
refs #57 , #162 let the pagination method name (defaulted to page
) configurable
...
now Kaminari can live together with associations named `page` and models having method named `page`
2011-12-17 16:33:06 +09:00
Uchio Kondo
1da155b15b
make it to work well with Sinatra/Padrino, thanks to #161 & #174
2011-11-21 20:15:06 +09:00
Akira Matsuda
f41de10abb
PaginatableArray can be instantiated without an argument
2011-09-21 14:45:00 +09:00
Akira Matsuda
6629f5bfe0
be paginatable if both limit and offset are given when initializing
...
don't have to call offset() to be paginatable
2011-08-26 08:23:51 +09:00
Akira Matsuda
b5e16c0a94
keep the whole Array if total_count is given
2011-08-26 08:22:54 +09:00
Akira Matsuda
4d50416cdd
API change for PaginatableArray.new
...
using options hash instead of three nullable arguments
2011-08-25 12:00:31 +09:00
Akira Matsuda
807a2fa3e7
Merge branch 'patch-1' of https://github.com/samdalton/kaminari into samdalton-patch-1
...
Conflicts:
lib/kaminari/models/array_extension.rb
2011-08-24 20:06:47 +09:00
Akira Matsuda
43e66e2d55
Revert "add current_page to PaginatableArray"
...
This partially reverts commit 7532ecc4fc
.
2011-08-21 08:38:41 +09:00
Akira Matsuda
7532ecc4fc
add current_page to PaginatableArray
2011-08-17 21:17:00 +09:00
Sam Dalton
a7b8b02941
Added a param to allow setting of the total count of documents to paginate through. Useful for when working with RSolr.
2011-07-24 19:34:37 -07:00
Akira Matsuda
e9c5d02ec6
"warning: don't put space before argument parentheses" (thanks @Skulli)
2011-04-22 18:38:51 +09:00
Akira Matsuda
e04f65aeaa
refs #47 , #68 , #74 generic pagination support for Array object
...
this enables you to paginate through any Arrayish object in this way:
Kaminari.paginate_array(my_array_object).page(params[:page]).per(10)
2011-04-22 11:43:08 +09:00