CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Thu, 24 Jul 2025 06:57:09 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20090221133200
location: https://web.archive.org/web/20090221133200/https://github.com/github/will_paginate/tree/2.1.0
server-timing: captures_list;dur=0.724599, exclusion.robots;dur=0.024108, exclusion.robots.policy;dur=0.010092, esindex;dur=0.013907, cdx.remote;dur=11.782495, LoadShardBlock;dur=439.688968, PetaboxLoader3.datanode;dur=234.186068, PetaboxLoader3.resolve;dur=124.578265
x-app-server: wwwb-app211
x-ts: 302
x-tr: 486
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: SERVER=wwwb-app211; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Thu, 24 Jul 2025 06:57:10 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.6.31
x-archive-orig-date: Sat, 21 Feb 2009 13:31:59 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-x-runtime: 277ms
x-archive-orig-etag: "a409d1cf45f90cbc1f1fb17a71950a79"
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-orig-content-length: 28166
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: windows-1252
memento-datetime: Sat, 21 Feb 2009 13:32:00 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Sat, 21 Feb 2009 13:32:00 GMT", ; rel="memento"; datetime="Sat, 21 Feb 2009 13:32:00 GMT", ; rel="last memento"; datetime="Sat, 21 Feb 2009 13:32:00 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 52_8_20090221115624_crawl100-c/52_8_20090221133032_crawl101.arc.gz
server-timing: captures_list;dur=0.623096, exclusion.robots;dur=0.023708, exclusion.robots.policy;dur=0.011412, esindex;dur=0.018524, cdx.remote;dur=10.187484, LoadShardBlock;dur=259.565005, PetaboxLoader3.datanode;dur=325.329084, PetaboxLoader3.resolve;dur=217.899276, load_resource;dur=318.744309
x-app-server: wwwb-app211
x-ts: 200
x-tr: 698
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
github's will_paginate at 2.1.0 - GitHub
This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (

This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (

Run the following if you haven't already:
gem sources -a https://gems.github.com
Install the gem(s):
sudo gem install github-will_paginate
Fork of mislav/will_paginate | |
Description: | Most awesome pagination solution for Rails |
Homepage: | https://github.com/mislav/will_paginate/wikis |
Clone URL: |
git://github.com/github/will_paginate.git
Give this clone URL to anyone.
git clone git://github.com/github/will_paginate.git
|
name | age | message | |
---|---|---|---|
![]() |
.gitignore | Sun Mar 02 14:43:38 -0800 2008 | Installation instructions for gem [mislav] |
![]() |
CHANGELOG | Sat Jan 19 17:49:26 -0800 2008 | forgot to add a bunch of files generated by newgem [mislav] |
![]() |
LICENSE | Sat Jan 19 17:44:33 -0800 2008 | gem setup using newgem [mislav] |
![]() |
Manifest.txt | Sat Mar 01 19:16:11 -0800 2008 | replace Hoe with manual package and release tasks [mislav] |
![]() |
README | Sat Mar 01 19:16:11 -0800 2008 | replace Hoe with manual package and release tasks [mislav] |
![]() |
Rakefile | Sat Mar 01 19:16:11 -0800 2008 | replace Hoe with manual package and release tasks [mislav] |
![]() |
config/ | Sun Mar 02 08:15:39 -0800 2008 | Correct package name for release [mislav] |
![]() |
lib/ | Sat Mar 01 19:27:34 -0800 2008 | cleanup from newgem [mislav] |
![]() |
setup.rb | Sat Jan 19 17:49:26 -0800 2008 | forgot to add a bunch of files generated by newgem [mislav] |
![]() |
test/ | Thu Feb 28 07:45:36 -0800 2008 | Add page_entries_info view helper [mislav] |
= WillPaginate Pagination is just limiting the number of records displayed. Why should you let it get in your way while developing, then? This plugin makes magic happen. Did you ever want to be able to do just this on a model: Post.paginate :page => 1, :order => 'created_at DESC' ... and then render the page links with a single view helper? Well, now you can. Ryan Bates made an awesome screencast[https://railscasts.com/episodes/51], check it out. Your mind reels with questions? Join our Google group[https://groups.google.com/group/will_paginate]. You can find more documentation on the wiki[https://github.com/mislav/will_paginate/wikis]. == Example usage Use a paginate finder in the controller: @posts = Post.paginate_by_board_id @board.id, :page => params[:page], :order => 'updated_at DESC' Yeah, +paginate+ works just like +find+ -- it just doesn't fetch all the records. Don't forget to tell it which page you want, or it will complain! Read more on WillPaginate::Finder::ClassMethods. Render the posts in your view like you would normally do. When you need to render pagination, just stick this in: <%= will_paginate @posts %> You're done. (Copy and paste the example fancy CSS styles from the bottom.) You can find the option list at WillPaginate::ViewHelpers. How does it know how much items to fetch per page? It asks your model by calling its <tt>per_page</tt> class method. You can define it like this: class Post < ActiveRecord::Base cattr_reader :per_page @@per_page = 50 end ... or like this: class Post < ActiveRecord::Base def self.per_page 50 end end ... or don't worry about it at all. WillPaginate defines it to be <b>30</b> by default. But you can always specify the count explicitly when calling +paginate+: @posts = Post.paginate :page => params[:page], :per_page => 50 The +paginate+ finder wraps the original finder and returns your resultset that now has some new properties. You can use the collection as you would with any ActiveRecord resultset. WillPaginate view helpers also need that object to be able to render pagination: <ol> <% for post in @posts -%> <li>Render `post` in some nice way.</li> <% end -%> </ol> <p>Now let's render us some pagination!</p> <%= will_paginate @posts %> More detailed documentation: * WillPaginate::Finder::ClassMethods for pagination on your models; * WillPaginate::ViewHelpers for your views. == Oh noes, a bug! Tell us what happened so we can fix it, quick! Issues are filed on the Lighthouse project: https://err.lighthouseapp.com/projects/466-plugins/tickets?q=tagged:will_paginate Steps to make an awesome bug report: 1. Run <tt>rake test</tt> in the <i>will_paginate</i> directory. (You will need SQLite3.) Copy the output if there are failing tests. 2. Register on Lighthouse to create a new ticket. 3. Write a descriptive, short title. Provide as much info as you can in the body. Assign the ticket to Mislav and tag it with meaningful tags, <tt>"will_paginate"</tt> being among them. 4. Yay! You will be notified on updates automatically. Here is an example of a great bug report and patch: https://err.lighthouseapp.com/projects/466/tickets/172-total_entries-ignored-in-paginate_by_sql == Authors, credits, contact Want to discuss, request features, ask questions? Join the Google group: https://groups.google.com/group/will_paginate Authors:: Mislav Marohnić, PJ Hyett Original announcement:: https://errtheblog.com/post/929 Original PHP source:: https://www.strangerstudios.com/sandbox/pagination/diggstyle.php All these people helped making will_paginate what it is now with their code contributions or simply awesome ideas: Chris Wanstrath, Dr. Nic Williams, K. Adam Christensen, Mike Garey, Bence Golda, Matt Aimonetti, Charles Brian Quinn, Desi McAdam, James Coglan, Matijs van Zuijlen, Maria, Brendan Ribera, Todd Willey, Bryan Helmkamp, Jan Berkel. == Usable pagination in the UI Copy the following CSS into your stylesheet for a good start: .pagination { padding: 3px; margin: 3px; } .pagination a { padding: 2px 5px 2px 5px; margin: 2px; border: 1px solid #aaaadd; text-decoration: none; color: #000099; } .pagination a:hover, .pagination a:active { border: 1px solid #000099; color: #000; } .pagination span.current { padding: 2px 5px 2px 5px; margin: 2px; border: 1px solid #000099; font-weight: bold; background-color: #000099; color: #FFF; } .pagination span.disabled { padding: 2px 5px 2px 5px; margin: 2px; border: 1px solid #eee; color: #ddd; } More reading about pagination as design pattern: * Pagination 101: https://kurafire.net/log/archive/2007/06/22/pagination-101 * Pagination gallery: https://www.smashingmagazine.com/2007/11/16/pagination-gallery-examples-and-good-practices/ * Pagination on Yahoo Design Pattern Library: https://developer.yahoo.com/ypatterns/parent.php?pattern=pagination
This feature is coming soon. Sit tight!