<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>UK Specialists in Ruby on Rails, Exalead, AWS, Consultancy - Roll your own pagination links with will_paginate Comments</title>
  <id>tag:thewebfellas.com,2012:/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate/comments</id>
  <generator uri="http://mephistoblog.com" version="0.7.3">Mephisto Noh-Varr</generator>
  <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate/comments.xml" rel="self" type="application/atom+xml"/>
  <link href="/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
  <updated>2011-09-15T17:11:31Z</updated>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Rob Anderton</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:29789</id>
    <published>2011-09-15T17:11:14Z</published>
    <updated>2011-09-15T17:11:14Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Rob Anderton</title>
<content type="html">&lt;p&gt;@SaveTimE: using the pagination in your edit action should be no problem, call paginate on whatever the collection is your paginating and pass the result to the helper in the view, just as you would in an index action (without seeing an example of code it's hard to be more specific!).&lt;/p&gt;

&lt;p&gt;It should also pick up the edit URL and just append a page number to it, so you'll get the ID just as you would with a normal edit URL. If you need to customise you can also pass the helper the &lt;code&gt;:params&lt;/code&gt; option with things like &lt;code&gt;:controller&lt;/code&gt; and &lt;code&gt;:action&lt;/code&gt;.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Rob Anderton</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:29788</id>
    <published>2011-09-15T16:49:30Z</published>
    <updated>2011-09-15T16:49:30Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Rob Anderton</title>
<content type="html">&lt;p&gt;@mahhek - sorry I didn't see this sooner, you've probably fixed it by now, but here goes anyway!&lt;/p&gt;
&lt;p&gt;The answer you got on stackoverflow is close to what you need. I think you're getting an error because the &lt;code&gt;page_link_or_span&lt;/code&gt; method expects two parameters, so the call should be something like:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;def windowed_links
  prev = nil

  visible_page_numbers.inject [] do |links, n|
    links &amp;lt;&amp;lt; gap_marker if prev and n &amp;gt; prev + 1
    links &amp;lt;&amp;lt; page_link_or_span(n, (n == current_page ? 'current' : nil))
    prev = n
    links
  end
end&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You should also make sure the &lt;code&gt;gap_marker&lt;/code&gt; method is returning a list item so it doesn't mess up the HTML list:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;def gap_marker
  &quot;&amp;lt;li&amp;gt;...&amp;lt;/li&amp;gt;&quot;
end&lt;/code&gt;&lt;/pre&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>SaveTimE</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:29781</id>
    <published>2011-09-15T13:22:22Z</published>
    <updated>2011-09-15T13:22:22Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by SaveTimE</title>
<content type="html">&lt;p&gt;Hi Rob,
I need to use pagination in the edit view.
I checked out your list renderer and it works perfect(thanks for that work), but how can I define that it is only used by a specific controller and where and how do I implement and pass the ID?&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>mahhek</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:27891</id>
    <published>2011-06-26T21:15:54Z</published>
    <updated>2011-06-26T21:15:54Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by mahhek</title>
<content type="html">&lt;p&gt;I am looking for the answer for this question :$&lt;/p&gt;

&lt;p&gt;http://stackoverflow.com/questions/3007429/will-paginate-how-to-add-a-separator-between-the-inner-window-and-outer-window&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Rob Anderton</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:20724</id>
    <published>2010-11-13T23:01:48Z</published>
    <updated>2010-11-13T23:01:48Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Rob Anderton</title>
<content type="html">&lt;p&gt;It should be a similar solution: add a form to your page which allows the &lt;code&gt;:page&lt;/code&gt; param to be set and add a little bit of typecasting in the controller to handle dodgy input. For example:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;# in the view
&amp;lt;% form_tag({}, { :method =&amp;gt; :get }) do %&amp;gt;
  &amp;lt;%= text_field_tag(&quot;page&quot;, @collection.current_page) %&amp;gt;
  &amp;lt;%= submit_tag(&quot;Go&quot;, :name =&amp;gt; nil) %&amp;gt;
&amp;lt;% end %&amp;gt;

# in the controller
page = params[:page].to_i &amp;lt; 1 ? 1 : params[:page]
@collection = Model.paginate(:page =&amp;gt; page)&lt;/code&gt;&lt;/pre&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Naveenkumar.R</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:20003</id>
    <published>2010-10-23T13:50:35Z</published>
    <updated>2010-10-23T13:50:35Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Naveenkumar.R</title>
<content type="html">&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I need to customize the will paginate like &quot;Pagination With Manual Page Input&quot;
For example:
The user can enter the page number in input box rather than selection box.
on press enter it should paginate to particular page.And also the input box should show the current page selected.&lt;/p&gt;

&lt;p&gt;Is it possible in will_paginate&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Rob Anderton</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:18582</id>
    <published>2010-08-22T22:46:35Z</published>
    <updated>2010-08-22T22:46:35Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Rob Anderton</title>
<content type="html">&lt;p&gt;hi shriya,&lt;br /&gt;It could be that you need to check the page numbers are valid, for example if you're on page 3 your current code will generate a link to page -2. I've not tried this but it might work:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;module WillPaginate
  class PaginationListLinkRenderer &amp;lt; LinkRenderer
    def to_html
       links = []
       links &amp;lt;&amp;lt; page_link_or_span(1, 'first_page', 1)
       links &amp;lt;&amp;lt; page_link_or_span(@collection.current_page - 5, 'prev5_page', &quot;&amp;lt;&amp;lt;prev5&quot;) if @collection.current_page - 5 &amp;gt; 0
       links &amp;lt;&amp;lt; page_link_or_span(@collection.previous_page, 'prev_page', &quot;&amp;lt;&amp;lt;prev&quot;)
       links &amp;lt;&amp;lt; page_link_or_span(@collection.current_page, 'current', @collection.current_page)
       links &amp;lt;&amp;lt; page_link_or_span(@collection.next_page, 'next_page', &quot;next&amp;gt;&amp;gt;&quot;)
       links &amp;lt;&amp;lt; page_link_or_span(@collection.current_page + 5, 'next5_page', &quot;next5&amp;gt;&amp;gt;&quot;) unless @collection.current_page + 5 &amp;gt; @collection.total_pages
       links &amp;lt;&amp;lt; page_link_or_span(@collection.total_pages, 'last_page', @collection.total_pages)

       html = links.join(@options[:separator])
       html = html.html_safe if html.respond_to? :html_safe
       @options[:container] ? @template.content_tag(:div, html, html_attributes) : html
    end
  end
end&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You might also notice you don't need to pass the 'disabled' style, that was a mistake in my earlier example which I'll fix. If this still raises an error post the error message you're getting and I'll take another look.&lt;/p&gt;

&lt;p&gt;Rob&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>shriya</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:18506</id>
    <published>2010-08-18T10:05:57Z</published>
    <updated>2010-08-18T10:05:57Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by shriya</title>
<content type="html">&lt;p&gt;i have posted the correct code in pastie and url is 
http://pastie.org/1099607&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>shriya</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:18505</id>
    <published>2010-08-18T09:55:58Z</published>
    <updated>2010-08-18T09:55:58Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by shriya</title>
<content type="html">&lt;p&gt;sorry pagination page must look like &lt;/p&gt;

&lt;p&gt;1 &amp;lt;&amp;lt;prev5&gt;&amp;lt;prev&gt;&gt; next5&gt;&gt; 50&lt;/p&gt;

&lt;p&gt;1 means first page
50 means last page&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>shriya</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:18504</id>
    <published>2010-08-18T09:51:55Z</published>
    <updated>2010-08-18T09:51:55Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by shriya</title>
<content type="html">&lt;p&gt;nice article Rob, &lt;br /&gt;
i want the pagination to look like this &lt;br /&gt;
1 &amp;lt;&amp;lt;prev5 &amp;lt;&amp;lt;prev 6 next&amp;gt;&amp;gt; next5&amp;gt;&amp;gt; 50&lt;/p&gt;
&lt;p&gt;so i customized the code somewhat  like below in PaginationListLinkRenderer&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;def to_html
  links = []
  links.unshift page_link_or_span(1, 'disabled first_page', 1)
  links.push  page_link_or_span(@collection.previous_page - 4, 'disabled prev5_page', @options[:previous])
  links.push  page_link_or_span(@collection.previous_page, 'disabled prev_page', @options[:previous_label])
  links.push page_link_or_span(@collection.current_page, 'current')
  links.push page_link_or_span(@collection.next_page, 'disabled next_page', @options[:next_label])
  links.push page_link_or_span(@collection.next_page + 4, 'disabled next5_page', @options[:next])
  links.push    page_link_or_span(@collection.total_pages,     'disabled last_page', @collection.total_pages)
  html = links.join(@options[:separator])
  html = html.html_safe if html.respond_to? :html_safe
  @options[:container] ? @template.content_tag(:div, html, html_attributes) : html
end&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;it is throwing error when i click on first page and last page link can u help me&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Rob Anderton</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:18454</id>
    <published>2010-08-16T16:53:47Z</published>
    <updated>2010-08-16T16:53:47Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Rob Anderton</title>
<content type="html">&lt;p&gt;Yep coming to a blog near you very soon!&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Cyrille</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:18444</id>
    <published>2010-08-16T08:45:37Z</published>
    <updated>2010-08-16T08:45:37Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Cyrille</title>
<content type="html">&lt;p&gt;Hi Rob, great article. Any plan for an update for will_paginate 3 and rails 3 ?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>sharath</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:18319</id>
    <published>2010-08-09T14:36:26Z</published>
    <updated>2010-08-09T14:36:26Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by sharath</title>
<content type="html">&lt;p&gt;Thank you Rob:) Thanks for this Fantastic article!!!!!!!.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Rob Anderton</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:18281</id>
    <published>2010-08-06T23:04:36Z</published>
    <updated>2010-08-06T23:04:36Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Rob Anderton</title>
<content type="html">&lt;p&gt;Add a form to your page and when it's submitted, pass the value to the paginate method in the controller, for example:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;# in the view
&amp;lt;% form_tag({}, { :method =&gt; :get }) do %&gt;
  &amp;lt;%= select_tag(&quot;per_page&quot;, options_for_select([ [ &quot;24 per page&quot;, 24 ], [ &quot;48 per page&quot;, 48 ], [ &quot;96 per page&quot;, 96 ] ], @per_page)) %&gt;
  &amp;lt;%= submit_tag(&quot;Go&quot;, :name =&gt; nil) %&gt;
&amp;lt;% end %&gt;

# in the controller
@per_page = params[:per_page].blank? ? 24 : params[:per_page].to_i
@collection = Model.paginate(:page =&gt; params[:page], :per_page =&gt; @per_page)&lt;/code&gt;&lt;/pre&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>sharath</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:18263</id>
    <published>2010-08-05T14:42:14Z</published>
    <updated>2010-08-05T14:42:14Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by sharath</title>
<content type="html">&lt;p&gt;ya &quot;Pagination With Manual Page Input&quot; i wanted  2 item that have option 
like selecting 24 per pages or 48 per pages,or 96 per pages like that taking input from user for how many pages must be there per pages  &lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Rob Anderton</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:18261</id>
    <published>2010-08-05T13:28:07Z</published>
    <updated>2010-08-05T13:28:07Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Rob Anderton</title>
<content type="html">&lt;p&gt;Which bit of the article do you mean? The &quot;Pagination With Manual Page Input&quot; section, or something else?&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>sharath</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:18259</id>
    <published>2010-08-05T09:59:59Z</published>
    <updated>2010-08-05T09:59:59Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by sharath</title>
<content type="html">&lt;p&gt;thanks for your answer Rob
i want to give manually input for pagination ,allowing users to select how many pages they want to be display as shown in this website&lt;/p&gt;

&lt;p&gt;http://www.smashingmagazine.com/2007/11/16/pagination-gallery-examples-and-good-practices/&lt;/p&gt;

&lt;p&gt;can i achieve it using will paginate &lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Rob Anderton</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:18247</id>
    <published>2010-08-04T21:53:27Z</published>
    <updated>2010-08-04T21:53:27Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Rob Anderton</title>
<content type="html">&lt;p&gt;My first thought was to use the default link renderer with &lt;code&gt;:inner_window&lt;/code&gt; and &lt;code&gt;:outer_window&lt;/code&gt; options set to zero but because of the way it calculates the visible pages this doesn't work.&lt;/p&gt;

&lt;p&gt;Instead you'll need to define a custom link renderer and, like in &lt;a href=&quot;#comment-15754&quot;&gt;comment 21&lt;/a&gt;, just override the &lt;code&gt;to_html&lt;/code&gt; method to do something like this:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;def to_html
  html = [
    page_link_or_span(@collection.previous_page, 'prev_page', @options[:previous_label]),
    page_link_or_span(@collection.current_page, 'current'),
    page_link_or_span(@collection.next_page, 'next_page', @options[:next_label])
  ].join(@options[:separator])

  html = html.html_safe if html.respond_to? :html_safe
  @options[:container] ? @template.content_tag(:div, html, html_attributes) : html
end&lt;/code&gt;&lt;/pre&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>sharath</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:18239</id>
    <published>2010-08-04T12:40:04Z</published>
    <updated>2010-08-04T12:40:04Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by sharath</title>
<content type="html">&lt;p&gt;hi Rob&lt;/p&gt;

&lt;p&gt;i want to display only previous , next and current page no 
how can i do it &lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Rob Anderton</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:18207</id>
    <published>2010-08-03T09:57:57Z</published>
    <updated>2010-08-03T09:57:57Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Rob Anderton</title>
<content type="html">&lt;p&gt;@nirmal: if you post the relevant code (as a &lt;a href=&quot;http://pastie.org/&quot; title=&quot;Make a pastie&quot;&gt;pastie&lt;/a&gt; or a &lt;a href=&quot;http://gist.github.com/&quot; title=&quot;Get the gist&quot;&gt;gist&lt;/a&gt;) I'll take a look, at the moment it's hard to figure out exactly what you're doing :)&lt;/p&gt;

&lt;p&gt;@diego: the API has changed a lot for version 3 causing &lt;a href=&quot;http://wiki.github.com/mislav/will_paginate/backwards-incompatibility&quot; title=&quot;Read about backwards incompatibility&quot;&gt;breakage&lt;/a&gt; of code like my custom renderer. I'll have to get around to doing a new post about it, but until then take a look at the new &lt;code&gt;WillPaginate::ViewHelpers::LinkRenderer&lt;/code&gt; &lt;a href=&quot;http://github.com/mislav/will_paginate/blob/rails3/lib/will_paginate/view_helpers/link_renderer.rb&quot; title=&quot;View the new link renderer code&quot;&gt;source&lt;/a&gt; as it doesn't look as if it'll be too hard to modify my code to work with this new version.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Diego Plentz</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:17155</id>
    <published>2010-07-29T15:02:49Z</published>
    <updated>2010-07-29T15:02:49Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Diego Plentz</title>
<content type="html">&lt;p&gt;Rob,&lt;/p&gt;

&lt;p&gt;I'm using will_paginate 3.0.pre2 with rails 3.0.0.rc, but even if I put the PaginationListLinkRenderer class inside RAILS_ROOT/lib, then I visit my page that has pagination, I receive the following error:&lt;/p&gt;

&lt;p&gt;ActionView::Template::Error (uninitialized constant PaginationListLinkRenderer):&lt;/p&gt;

&lt;p&gt;You know anything I can do to try fix this?&lt;/p&gt;

&lt;p&gt;Thanks in advance&lt;/p&gt;

&lt;p&gt;ps: btw, if I put PaginationListLinkRenderer inside RAILS_ROOT/app/helpers, the error change to: &quot;ActionView::Template::Error (uninitialized constant WillPaginate::LinkRenderer)&quot;&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>nirmal</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:16564</id>
    <published>2010-07-23T08:32:15Z</published>
    <updated>2010-07-23T08:32:15Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by nirmal</title>
<content type="html">&lt;p&gt;iam using two different images in pagination
i.e. one for pagelinks and another for (previous_label and next_label)&lt;/p&gt;

&lt;p&gt;but i could only see image used for pagelinks in the placae of  image for(prev and next labels)&lt;/p&gt;

&lt;p&gt;so it displays same image for both pagelinks and (prev and next labels).&lt;/p&gt;

&lt;p&gt;how can i display two different images i.e. one image for pagelinks and another image for (prev and next labels)&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Kent Fenwick</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:16136</id>
    <published>2010-06-23T20:50:27Z</published>
    <updated>2010-06-23T20:50:27Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Kent Fenwick</title>
<content type="html">&lt;p&gt;Thank you for this!  Fantastic article.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Rob Anderton</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:16033</id>
    <published>2010-06-17T11:10:53Z</published>
    <updated>2010-06-17T11:10:53Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Rob Anderton</title>
<content type="html">&lt;p&gt;@irishman_irl: if you're using the default link renderer then it should already be doing this, if you're using the &lt;code&gt;PaginationListLinkRenderer&lt;/code&gt; from this post then you need to change the &lt;code&gt;windowed_links&lt;/code&gt; method to work more like the &lt;a href=&quot;http://github.com/mislav/will_paginate/blob/master/lib/will_paginate/view_helpers.rb#L260&quot; title=&quot;See default renderer code&quot;&gt;default renderer&lt;/a&gt; and also define a new constructor to initialize the @gap_marker instance variable to use a list item instead of the &lt;a href=&quot;http://github.com/mislav/will_paginate/blob/master/lib/will_paginate/view_helpers.rb#L214&quot; title=&quot;See default renderer code&quot;&gt;default &lt;code&gt;span&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;@Jose: if you're using the &lt;code&gt;PaginationListLinkRenderer&lt;/code&gt; from this blog then you can change the &lt;code&gt;windowed_links&lt;/code&gt; method to do what you need:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;def windowed_links
  visible_page_numbers.map { |n| page_link_or_span(n, (n == current_page ? 'number current' : 'current')) }
end&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If you're using the default link renderer then you need to override the &lt;code&gt;windowed_links&lt;/code&gt; method in your subclass and change &lt;a href=&quot;http://github.com/mislav/will_paginate/blob/master/lib/will_paginate/view_helpers.rb#L266&quot; title=&quot;See the default renderer code&quot;&gt;this line&lt;/a&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;links &amp;lt;&amp;lt; page_link_or_span(n, 'current')&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;to this:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;links &amp;lt;&amp;lt; page_link_or_span(n, 'current number')&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And will_paginate should take care of the rest.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Goyox86</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:15894</id>
    <published>2010-06-09T21:03:36Z</published>
    <updated>2010-06-09T21:03:36Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Goyox86</title>
<content type="html">&lt;p&gt;Oops! , The &quot;number current&quot;, is the class for the current page.&lt;/p&gt;

&lt;p&gt;Jose  &lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Goyox86</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:15893</id>
    <published>2010-06-09T21:02:26Z</published>
    <updated>2010-06-09T21:02:26Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Goyox86</title>
<content type="html">&lt;p&gt;Hi People,&lt;/p&gt;

&lt;p&gt;The graphic designer who is working with me, has customized the look of the pagination links with two CSS classes, &quot;number&quot; for all the pages number links, and &quot;number current&quot;. this post is excellent, but i'm pretty messy on how i can achieve this?, I've sub-classed WillPaginate::LinkRenderer, and created a initializer but, i don't know how to apply the css classes, to the generated markup.&lt;/p&gt;

&lt;p&gt;Thx in advance!
Jose  &lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>irishman_irl</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:15886</id>
    <published>2010-06-09T15:39:52Z</published>
    <updated>2010-06-09T15:39:52Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by irishman_irl</title>
<content type="html">&lt;p&gt;Fantastic tutorial, really helped me out in work to quickly solve a problem. &lt;/p&gt;

&lt;p&gt;One issue I have though, there are 70 pages to be paginated, I have set the :inner_window=&gt;2 and :outer_window=&gt;2 and the pagination produces:&lt;/p&gt;

&lt;p&gt;1 2 3 4 5 65 66 67&lt;/p&gt;

&lt;p&gt;How can I add a &quot;...&quot; seperator between 5 and 65 in the page numbers?&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Tony Maserati</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:15849</id>
    <published>2010-06-07T10:59:02Z</published>
    <updated>2010-06-07T10:59:02Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Tony Maserati</title>
<content type="html">&lt;p&gt;Much obliged!&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Rob Anderton</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:15754</id>
    <published>2010-06-01T21:31:23Z</published>
    <updated>2010-06-01T21:31:23Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Rob Anderton</title>
<content type="html">&lt;p&gt;You can create your own subclass of the default link renderer and override the &lt;code&gt;to_html&lt;/code&gt; method like this:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;class CustomLinkRenderer &amp;lt; WillPaginate::LinkRenderer

  def to_html
    links = @options[:page_links] ? windowed_links : []
    # previous/next buttons
    links.push(page_link_or_span(@collection.previous_page, 'prev_page', @options[:previous_label]))
    links.push(page_link_or_span(@collection.next_page, 'next_page', @options[:next_label]))

    html = links.join(@options[:separator])
    html = html.html_safe if html.respond_to?(:html_safe)
    @options[:container] ? @template.content_tag(:div, html, html_attributes) : html
  end

end&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The only change here is that the previous link is being pushed onto the end of the links array rather than being added to the start of the array.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Tony Maserati</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:15744</id>
    <published>2010-06-01T14:12:05Z</published>
    <updated>2010-06-01T14:12:05Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Tony Maserati</title>
<content type="html">&lt;p&gt;Anybody know how to make it &quot;1 2 3 Previous Next&quot; as opposed to &quot;Previous 1 2 3 Next&quot;? Thank you.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Pedro Teixeira</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:14660</id>
    <published>2010-04-13T14:25:39Z</published>
    <updated>2010-04-13T14:25:39Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Pedro Teixeira</title>
<content type="html">&lt;p&gt;Thanks a lot for the the instructions on making your own will_paginate custom renderer!&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Rob Anderton</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:14343</id>
    <published>2010-03-27T19:33:33Z</published>
    <updated>2010-03-27T19:33:33Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Rob Anderton</title>
<content type="html">&lt;p&gt;@Bram: not sure what your rails/will_paginate versions are but you could try forcing the correct class name by prefixing it with &lt;code&gt;::&lt;/code&gt;, for example:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;WillPaginate::ViewHelpers.pagination_options[:renderer] = '::PaginationListLinkRenderer'&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If that doesn't help post the relevant code (as a &lt;a href=&quot;http://pastie.org/&quot; title=&quot;Make a pastie&quot;&gt;pastie&lt;/a&gt; or a &lt;a href=&quot;http://gist.github.com/&quot; title=&quot;Get the gist&quot;&gt;gist&lt;/a&gt;) and I'll take a look.&lt;/p&gt;

&lt;p&gt;Rob&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Bram</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:14314</id>
    <published>2010-03-26T15:15:09Z</published>
    <updated>2010-03-26T15:15:09Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Bram</title>
<content type="html">&lt;p&gt;uninitialized constant ActionView::Base::CompiledTemplates::PaginationListLinkRenderer&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Bram</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:14313</id>
    <published>2010-03-26T15:14:32Z</published>
    <updated>2010-03-26T15:14:32Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Bram</title>
<content type="html">&lt;p&gt;Can't get the custom renderer to initialize, any help?
I'll be googling in the meantime.
Nice tutorial, this info should be in de will_paginate docs.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Rob Anderton</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:12559</id>
    <published>2010-01-13T10:57:21Z</published>
    <updated>2010-01-13T10:57:21Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Rob Anderton</title>
<content type="html">&lt;p&gt;If you post the code you have so far (either as a &lt;a href=&quot;http://pastie.org/&quot; title=&quot;Make a pastie&quot;&gt;pastie&lt;/a&gt; or a &lt;a href=&quot;http://gist.github.com/&quot; title=&quot;Get the gist&quot;&gt;gist&lt;/a&gt;) I'd be happy to take a look at what you're missing.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Volkan Caliskan</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:12493</id>
    <published>2010-01-11T20:01:20Z</published>
    <updated>2010-01-11T20:01:20Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Volkan Caliskan</title>
<content type="html">&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&amp;lt;div class=&quot;pager bottompager&quot;&amp;gt;
 &amp;lt;a href=&quot;&quot; class=&quot;first&quot;&amp;gt;&amp;lt;/a&amp;gt;
 &amp;lt;a href=&quot;&quot; class=&quot;previous&quot;&amp;gt;&amp;lt;img src=&quot;images/prev.gif&quot; alt=&quot;&quot; /&amp;gt; Previous&amp;lt;/a&amp;gt;
 &amp;lt;div class=&quot;pages&quot;&amp;gt;
  &amp;lt;a href=&quot;&quot; class=&quot;current&quot;&amp;gt;1&amp;lt;/a&amp;gt;
  &amp;lt;a href=&quot;&quot;&amp;gt;2&amp;lt;/a&amp;gt;
  &amp;lt;a href=&quot;&quot;&amp;gt;3&amp;lt;/a&amp;gt;
 &amp;lt;/div&amp;gt;
 &amp;lt;a href=&quot;&quot; class=&quot;next&quot;&amp;gt;Next &amp;lt;img src=&quot;images/next.gif&quot; alt=&quot;&quot; /&amp;gt;&amp;lt;/a&amp;gt;
 &amp;lt;a href=&quot;&quot; class=&quot;last&quot;&amp;gt;&amp;lt;/a&amp;gt;
&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Very professional tutorial, thank you. I figured out most of the things but still can't get this exact view. Any ideas would be highly appreciated!&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>James</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:9083</id>
    <published>2009-10-06T19:25:04Z</published>
    <updated>2009-10-06T19:25:04Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by James</title>
<content type="html">&lt;p&gt;Thanks guys, this was very useful! :)&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>yufang</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:5274</id>
    <published>2009-05-20T05:28:43Z</published>
    <updated>2009-05-20T05:28:43Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by yufang</title>
<content type="html">&lt;p&gt;I want to use will_paginate with ajax ,But how do i do it?&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Rob Anderton</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:4772</id>
    <published>2009-05-10T15:55:07Z</published>
    <updated>2009-05-10T15:55:07Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Rob Anderton</title>
<content type="html">&lt;p&gt;@vatsav: to turn off page links without needing to do any custom coding, you can set the page_links option to false in an initializer:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;WillPaginate::ViewHelpers.pagination_options[:page_links] = false&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To get the first and last page links, you'll need to write your own custom link renderer, and do something like this in the &lt;code&gt;to_html&lt;/code&gt; method:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;links.unshift(page_link_or_span(1, 'first', 'First'))
    links.push(page_link_or_span(@collection.total_pages, 'last', 'Last'))&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Rob&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>vatsav</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:4390</id>
    <published>2009-04-29T14:06:41Z</published>
    <updated>2009-04-29T14:06:41Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by vatsav</title>
<content type="html">&lt;p&gt;i dont want the page numbers to be displayed along with previous and next. and I want first and last pages instead og numbers. can anybody please tell me how to do that?&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Rob Anderton</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:3616</id>
    <published>2009-03-30T07:45:51Z</published>
    <updated>2009-03-30T07:45:51Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Rob Anderton</title>
<content type="html">&lt;p&gt;I usually put the link renderer in my lib folder, for example in &lt;samp&gt;RAILS_ROOT/lib/pagination_list_link_renderer.rb&lt;/samp&gt;. I then create a plugins initializer in &lt;samp&gt;RAILS_ROOT/config/initializers/plugins.rb&lt;/samp&gt; that contains the WillPaginate configuration:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;WillPaginate::ViewHelpers.pagination_options[:renderer] = 'PaginationListLinkRenderer'&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Rails will then autoload the class (so no requires required!) because it is in the lib folder.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>g-sal</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:3609</id>
    <published>2009-03-29T22:13:07Z</published>
    <updated>2009-03-29T22:13:07Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by g-sal</title>
<content type="html">&lt;p&gt;This information was very useful, thank you. Unfortunately I'm new to Ruby and Rails and was wondering where the extended class should be located in the application? Also, are there are dependencies I need to declare and where (like 'require' or something similar?)&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Rob Anderton</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:2229</id>
    <published>2008-10-31T08:47:28Z</published>
    <updated>2008-10-31T08:47:28Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Rob Anderton</title>
<content type="html">&lt;p&gt;Do you mean the ‘…’ and the gap in page numbers? If so, that’s the windowed links functionality of will_paginate, so that even if you had 1,000 pages to link to the pagination area wouldn't take up a huge amount of space.&lt;/p&gt;

&lt;p&gt;You can customise the windowing behaviour using the &lt;code&gt;:inner_window&lt;/code&gt; (the number of page links shown before and after the current page - defaults to 4) and &lt;code&gt;:outer_window&lt;/code&gt; (the number of page links shown at the start and end of pagination - defaults to 1) settings.&lt;/p&gt;

&lt;p&gt;To get rid of windowing altogether, you could look at overriding the &lt;code&gt;visible_page_numbers&lt;/code&gt; method in your &lt;code&gt;LinkRenderer&lt;/code&gt; class (this is where the windowing calculations are performed) and then replace the call to &lt;code&gt;windowed_links&lt;/code&gt; in the &lt;code&gt;to_html&lt;/code&gt; method to call &lt;code&gt;visible_page_numbers&lt;/code&gt; directly.&lt;/p&gt;

&lt;p&gt;Hope that helps!&lt;br /&gt;Rob&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Zoran Kikic</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:2226</id>
    <published>2008-10-30T17:43:12Z</published>
    <updated>2008-10-30T17:43:12Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Zoran Kikic</title>
<content type="html">&lt;p&gt;Sorry, Markdown didn't like my links..&lt;/p&gt;

&lt;p&gt;again:
http://zoran.name/paginating_find.jpg
http://zoran.name/will_paginate.jpg&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Zoran Kikic</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:2223</id>
    <published>2008-10-30T09:35:04Z</published>
    <updated>2008-10-30T09:35:04Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Zoran Kikic</title>
<content type="html">&lt;p&gt;I modified your code and adapted some css (cross browser compatible) to it which I primarily wrote for paginating&lt;em&gt;find: (http://zoran.name/paginating&lt;/em&gt;find.jpg). &lt;/p&gt;

&lt;p&gt;My will&lt;em&gt;paginate looks now like this: (http://zoran.name/will&lt;/em&gt;paginate.jpg) - yes without gaps. What's the problem with those gaps in will_paginate? Can you please explain it a little bit? &lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Rob Anderton</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:2221</id>
    <published>2008-10-29T22:06:32Z</published>
    <updated>2008-10-29T22:06:32Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Rob Anderton</title>
<content type="html">&lt;p&gt;Hi Zoran,&lt;br /&gt;Thanks for the reminder - at the time of writing &lt;code&gt;:prev_label&lt;/code&gt; was correct, but since then Mislav &lt;a href=&quot;http://github.com/mislav/will_paginate/commit/9a93720c9f27c763ed58ec3a4d3a2e6b1a02379f&quot; title=&quot;See the commit on GitHub&quot;&gt;changed it&lt;/a&gt; to &lt;code&gt;:previous_label&lt;/code&gt;. I've updated the code to reflect this.&lt;br /&gt;Rob&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Zoran Kikic</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:2219</id>
    <published>2008-10-29T18:06:52Z</published>
    <updated>2008-10-29T18:06:52Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Zoran Kikic</title>
<content type="html">&lt;p&gt;Hey Rob,&lt;/p&gt;

&lt;p&gt;thanks for sharing!&lt;/p&gt;

&lt;p&gt;Good job but there is a small bug in your class:&lt;/p&gt;

&lt;p&gt;it must be
@options[:previous_label]
not
@options[:prev_label]&lt;/p&gt;

&lt;p&gt;cheers&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Rob Anderton</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:1212</id>
    <published>2008-08-04T07:11:51Z</published>
    <updated>2008-08-04T07:11:51Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Rob Anderton</title>
<content type="html">&lt;p&gt;Thanks for the update Mislav - I agree that there doesn’t seem to be a semantic way to represent gaps in lists of links which is why I cheated and didn’t include them in the example!&lt;/p&gt;

&lt;p&gt;Given that you can markup pagination however you want using custom renderers there doesn’t really seem to be a need to change what will_paginate does by default, although I guess you could include a list based renderer as part of the plugin/gem for those who want it.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://thewebfellas.com/">
    <author>
      <name>Mislav</name>
    </author>
    <id>tag:thewebfellas.com,2008-08-03:1196:1205</id>
    <published>2008-08-03T21:52:25Z</published>
    <updated>2008-08-03T21:52:25Z</updated>
    <category term="Blog"/>
    <link href="http://thewebfellas.com/blog/2008/8/3/roll-your-own-pagination-links-with-will_paginate" rel="alternate" type="text/html"/>
    <title>Comment on 'Roll your own pagination links with will_paginate' by Mislav</title>
<content type="html">&lt;p&gt;This is a good example of using a custom link renderer, but be aware that the link renderer API &lt;em&gt;could&lt;/em&gt; change in will_paginate 2.5. To lock the library to a specific version in your app, follow the instructions on &lt;a href=&quot;http://github.com/mislav/will_paginate/wikis/installation&quot;&gt;the will_paginate wiki&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;There have been feature requests for will_paginate to generate HTML lists in markup. I have given it a thought, but finally refused because of the &quot;gaps&quot; between page numbers (represented by &quot;...&quot;). I don't think those gaps can be semantically represented with lists in HTML.&lt;/p&gt;</content>  </entry>
</feed>

