Ben Woosley
92dbf6ff26
Use database cleaner in specs so we don't have to worry about test pollution ourselves
2011-04-19 19:01:23 +09:00
Akira Matsuda
465a2d049e
fixes #45 , #50 quick fix on count
to return the actual number of records on AR 3.0
2011-04-19 18:57:45 +09:00
Akira Matsuda
bfb09e61ad
refactor: simplify pagination helper
...
* get rid of PaginationRenderer
* move Paginator to main helpers file
2011-02-28 01:05:16 +09:00
Akira Matsuda
6411476ff6
refactor: simplify pagination helper
...
* get rid of Renderable mixin
* get rid of TemplateWrapper
2011-02-28 01:04:14 +09:00
Akira Matsuda
468fccfa39
refs #30 specs for new pagination helper
2011-02-27 20:28:00 +09:00
Akira Matsuda
393943a50e
refs #30 add real first/last page links, and use them by default instead of outer window
...
* :window, :outer_window, :left, :right will be interpreted similarly to how they were, except the supplied N would be the number of pages you actually get. 0 means disable for the outer windows
* outer windows will be disabled by default in favor of first/last links
* include a "disabled" class when appropriate, and always include the label text (but no link tag when current page). Users that want these tags to disappear completely when inapplicable can style them to display: none. (Similarly for "first" and "last".)
* changed the default labels - double angle quotes for "first" and "last", single angle quotes for "previous" and "next". (Consider a standard set of video or audio transport controls: << < stop > >>)
2011-02-25 12:33:23 +09:00
Akira Matsuda
4beef97cea
fixes #28 a page can be both current and first or last
...
merge _current_page, _first_page_link, _last_page_link and _page_link into one _page partial
2011-02-25 10:35:21 +09:00
Akira Matsuda
cacb646002
a bit more meaningful test case
2011-02-24 22:04:06 +09:00
Akira Matsuda
d3e2f4e552
Merge branch 'master' of https://github.com/tyok/kaminari into tyok-master
2011-02-24 21:55:18 +09:00
Rolf Timmermans
cb65a17c45
Do not break ActiveRecord::Base.descendants, by making sure to call super from ActiveRecord::Base.inherited.
2011-02-24 09:19:51 +01:00
Mohammad Satrio
f1641dc56f
fix vanishing mongoid criteria after calling #page
2011-02-24 02:20:42 +07:00
Akira Matsuda
d0b28fcc5f
tests for AR group query
2011-02-23 00:20:44 +09:00
Akira Matsuda
60a91a9667
digging a directory and moving files into it makes me feel like being Lode Runner...
2011-02-21 03:23:14 +09:00
Akira Matsuda
adef5d8aa1
prefer not to pollute AR::Base
2011-02-21 02:27:40 +09:00
Leonard Chin
be40c18e2b
Add YAML merge keys workaround.
...
Prevent problems when using running tests with
a mongoid.yml using YAML merge keys on Ruby 1.9.2
and RubyGems >= 1.5
Will be needed until r30629 and r30630 are backported
to 1.9.2 (ticket #4357 )
http://redmine.ruby-lang.org/issues/show/4357
2011-02-19 20:54:32 +09:00
Leonard Chin
1ada571065
Add magic encoding comment for Ruby 1.9
...
Required due to "»" character in spec example.
2011-02-19 20:50:55 +09:00
Akira Matsuda
5f3f73f99b
specs for mongoid scopes
2011-02-18 12:33:56 +09:00
Akira Matsuda
3c567d246b
avoid possible namespace collision
2011-02-18 08:16:56 +09:00
Akira Matsuda
60811bf5d7
Merge branch 'refactor'
2011-02-17 11:28:31 +09:00
Akira Matsuda
728666c54c
minus value for limit also falls back to the default value
...
and reduced the number of scopings when using default
2011-02-17 01:42:34 +09:00
Akira Matsuda
2353584af5
refactor: split PaginationRenderer's responsibility
2011-02-16 22:56:05 +09:00
ITO Koichi
4b3a0993da
Error happen under model.page(params[:page]).per(params[:per])
2011-02-15 18:41:49 +09:00
Akira Matsuda
8a3803697f
I said, Tag is not Renderable
2011-02-14 11:23:52 +09:00
Akira Matsuda
9f3d3944cb
refactor tags (Part II)
...
* prefer more testable and clearer way
* actually fixed a bug that Link was_not a Page. now everything conforms to the document, I believe
2011-02-13 22:59:25 +09:00
Akira Matsuda
6bfab14f10
:params option for the paginator
...
this overrides each pagination link's url_for option
2011-02-13 18:37:04 +09:00
Akira Matsuda
2a7514a53e
more tests to ensure that default per_page does not affect other models
2011-02-12 01:04:25 +09:00
Akira Matsuda
31b213a760
prepare for spec (part II)
2011-02-12 01:04:25 +09:00
Akira Matsuda
575a0b303b
"paginates_per" is a declarative DSL to set default per_page value for each model
2011-02-12 01:04:25 +09:00
Akira Matsuda
dd77a7dcb3
introduce modules to characterize each tag
2011-02-11 16:53:37 +09:00
Akira Matsuda
23186e5c9c
fixes #2 show nothing when num_page == 1
2011-02-09 01:41:43 +09:00
Akira Matsuda
0c12f5b639
use HTML5 <nav> tag for the container
2011-02-08 11:25:43 +09:00
Akira Matsuda
af61af9132
introducing Steak
2011-02-08 11:21:39 +09:00
Akira Matsuda
0a06feeb97
r g steak:spec users
2011-02-08 11:19:05 +09:00
Akira Matsuda
e9361b44cf
r g steak:install
2011-02-08 11:19:05 +09:00
Akira Matsuda
94b65da63f
extract the app from config file
2011-02-08 11:19:04 +09:00
Akira Matsuda
20484f9c02
rename method
...
s/tagify/tagify_links/g
2011-02-07 00:12:08 +09:00
Akira Matsuda
8036619ae6
default PER_PAGE to 25
2011-02-06 20:11:45 +09:00
Akira Matsuda
fa674a64cc
partialize tags
2011-02-05 23:45:49 +09:00
Akira Matsuda
bd2f1b5e23
the first implementation of pagination helper
2011-02-05 23:45:49 +09:00
Akira Matsuda
bfa1449f16
implement AR scopes
2011-02-05 23:45:49 +09:00
Akira Matsuda
ff721e02d5
prepare for the specs
2011-02-05 23:45:49 +09:00
Akira Matsuda
4db3397b4d
Initial commit to kaminari.
2011-02-05 22:32:10 +09:00