CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Fri, 29 Aug 2025 05:38:24 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20090116013108
location: https://web.archive.org/web/20090116013108/https://github.com/methodmissing/will_paginate/tree
server-timing: captures_list;dur=0.788156, exclusion.robots;dur=0.024961, exclusion.robots.policy;dur=0.010934, esindex;dur=0.015201, cdx.remote;dur=20.857308, LoadShardBlock;dur=322.895555, PetaboxLoader3.datanode;dur=74.370937, PetaboxLoader3.resolve;dur=162.575217
x-app-server: wwwb-app211
x-ts: 302
x-tr: 389
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-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 301
server: nginx
date: Fri, 29 Aug 2025 05:38:25 GMT
content-type: text/html; charset=utf-8
content-length: 123
x-archive-orig-server: nginx/0.6.26
x-archive-orig-date: Fri, 16 Jan 2009 01:31:07 GMT
x-archive-orig-connection: close
x-archive-orig-status: 301 Moved Permanently
location: https://web.archive.org/web/20090116013108/https://github.com/methodmissing/will_paginate/tree/master
x-archive-orig-x-runtime: 28ms
x-archive-orig-cache-control: no-cache
x-archive-orig-content-length: 123
cache-control: max-age=1800
memento-datetime: Fri, 16 Jan 2009 01:31:08 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Fri, 16 Jan 2009 01:31:08 GMT", ; rel="memento"; datetime="Fri, 16 Jan 2009 01:31:08 GMT", ; rel="last memento"; datetime="Fri, 16 Jan 2009 01:31:08 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_7_20090116011028_crawl104-c/52_7_20090116012633_crawl103.arc.gz
server-timing: captures_list;dur=0.634685, exclusion.robots;dur=0.025457, exclusion.robots.policy;dur=0.011230, esindex;dur=0.011399, cdx.remote;dur=35.552861, LoadShardBlock;dur=373.780344, PetaboxLoader3.datanode;dur=239.560852, PetaboxLoader3.resolve;dur=214.144636, load_resource;dur=93.403012
x-app-server: wwwb-app211
x-ts: 301
x-tr: 534
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=()
HTTP/2 200
server: nginx
date: Fri, 29 Aug 2025 05:38:26 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.6.31
x-archive-orig-date: Fri, 16 Jan 2009 01:31:08 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-x-runtime: 1154ms
x-archive-orig-etag: "0103de2058a08184d920ef543a4548af"
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-orig-content-length: 22774
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: windows-1252
memento-datetime: Fri, 16 Jan 2009 01:31:08 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Fri, 10 Oct 2008 19:14:14 GMT", ; rel="prev memento"; datetime="Fri, 10 Oct 2008 19:14:14 GMT", ; rel="memento"; datetime="Fri, 16 Jan 2009 01:31:08 GMT", ; rel="next memento"; datetime="Sat, 17 Jan 2009 05:06:53 GMT", ; rel="last memento"; datetime="Fri, 14 Aug 2009 12:13:35 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_7_20090116011028_crawl104-c/52_7_20090116012633_crawl103.arc.gz
server-timing: captures_list;dur=0.471499, exclusion.robots;dur=0.017760, exclusion.robots.policy;dur=0.008235, esindex;dur=0.010408, cdx.remote;dur=6.095579, LoadShardBlock;dur=76.945320, PetaboxLoader3.datanode;dur=64.339904, PetaboxLoader3.resolve;dur=80.006646, load_resource;dur=70.473693
x-app-server: wwwb-app211
x-ts: 200
x-tr: 211
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
methodmissing's will_paginate at master - 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 (

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/methodmissing/will_paginate.git
Give this clone URL to anyone.
git clone git://github.com/methodmissing/will_paginate.git
|

Lourens Naude (author)
Wed Apr 02 20:43:03 -0700 2008
name | age | message | |
---|---|---|---|
![]() |
.gitignore | Loading commit data... ![]() |
|
![]() |
LICENSE | Thu Aug 02 09:50:25 -0700 2007 | will_paginate: add license [#75 state:resolved] [chris] |
![]() |
README | ||
![]() |
Rakefile | Mon Jan 28 18:33:36 -0800 2008 | Use DB and RAILS_VERSION environment variables ... [mislav] |
![]() |
init.rb | Sun Jan 27 09:41:08 -0800 2008 | Remove unnecessary condition from plugin initia... [mislav] |
![]() |
lib/ | ||
![]() |
test/ |
= 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]. == Installation Will Paginate officially supports Rails versions 1.2.6 and 2.0.x. Previously, the plugin was available on the following SVN location: svn://errtheblog.com/svn/plugins/will_paginate In February 2008, it moved to GitHub[https://github.com/mislav/will_paginate/tree] to be tracked with git. The SVN repo continued to have updates, but not forever. Therefore you should switch to using the gem: gem install will_paginate --no-ri After that, you can remove the plugin from your applications and add a simple require to the end of config/environment.rb: require 'will_paginate' That's it, just remember to install the gem on all machines that you are deploying to. The second option is to download and extract the tarball from GitHub. Here is the link for downloading the current state of the master branch: https://github.com/mislav/will_paginate/tarball/master Extract it to <tt>vendor/plugins</tt>. The directory will have a default name like "mislav-will_paginate-master"; you can rename it to "will_paginate" for simplicity. == 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!