#154 ✓resolved
James Le Cuirot

[PATCH] Improvements including custom link rendering

Reported by James Le Cuirot | November 12th, 2007 @ 09:16 PM

Hi guys. This is a patch with a few improvements. Starting with the simplest...

  • The page parameter is reverse merged with the page parameters. This prevents @template.params from being clobbered.
  • Optional text labels: I didn't check here before I wrote this and I think someone may have written a patch for it already but oh well. Here's another one! The labels can be nil or blank.
  • Custom link rendering: Passing a block to will_paginate allows you to customize how the links are rendered in a similar way to pagination_links_each method. page and text are passed to the block.

Comments and changes to this ticket

  • Chris Wanstrath

    Chris Wanstrath November 12th, 2007 @ 09:16 PM

    • Assigned user changed from “Chris Wanstrath” to “Mislav”
    • State changed from “new” to “open”
  • Mislav

    Mislav December 25th, 2007 @ 03:41 AM

    • State changed from “open” to “resolved”

    Hey Chewi~

    Thanks for the suggestions. In a recent change I've changed the way @template.params are extracted, so I think now you can be sure they are not clobbered (but I don't think they were clobbered before, either).

    Text labels: they stay. If you blank them out then you will have prev/next links without text, but I refuse to make an option to remove them. Sorry :)

    Custom link rendering: follow ticket #165 for updates on this, I'm working on it as we speak.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Everyone's favorite Ruby library for pagination of practically anything!

People watching this ticket