Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

[PATCH] Improvements including custom link rendering

#154

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.

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

State: resolved
Milestone: none
Assigned to: Mislav Mislav

Activity

  1. Chris Wanstrath
    Chris Wanstrath
    • Assigned user changed from Chris Wanstrath to Mislav
    • State changed from new to open

    November 12th, 2007 @ 09:16 PM

  2. Mislav
    Mislav
    • 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.

    December 25th, 2007 @ 03:41 AM

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.