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.

add pagination info to array.to_xml ?

#228

as paginate return array when render in xml, the pagination information will no be there.

I add an to_xml function into will_paginate/lib/will_paginate/collection.rb and modify activesupport-2.1.0/lib/active_support/core_ext/array/conversions.rb and then the generated xml contain pagination attributes.

the patch was on old version of will_paginate. total_pages is not there but should be extremely easy to add.

I'll upload my patch soon.

Reported by ycheng · June 3rd, 2008 @ 03:18 PM

State: open
Assigned to: Mislav Mislav

Activity

  1. ycheng
  2. ycheng
  3. ycheng
    ycheng

    oops, the two attachment are the same, feel free to delete one. sorry.

    June 3rd, 2008 @ 03:23 PM

  4. Mislav
    Mislav
    • Assigned user changed from Chris Wanstrath to Mislav
    • State changed from new to open
    • Title changed from new feature: add pagination info to array.to_xml ? to add pagination info to array.to_xml ?

    This would be useful for ActiveResource. I'm beginning to officially support this in the "agnostic" branch on GitHub. Feel free to look at it.

    I'll try to make something out of your patch.

    June 11th, 2008 @ 02:05 PM

  5. Mislav
    Mislav
    • Milestone set to will_paginate v3.0 ("agnostic")
    • Tag set to feature, will_paginate

    October 8th, 2008 @ 11:07 PM

  6. Isla Maria
    Isla Maria

    Since I was looking to add pagination to my source code, this piece of information is very useful for me. I think these types of codes will be useful to all especially students. THank you. Keep updating more useful blogs like this. google chrome keeps freezing

    March 8th, 2018 @ 12:15 PM

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.