add pagination info to array.to_xml ?
Reported by ycheng | June 3rd, 2008 @ 03:18 PM | in will_paginate v3.0 ("agnostic")
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.
Comments and changes to this ticket
-
ycheng June 3rd, 2008 @ 03:23 PM
oops, the two attachment are the same, feel free to delete one. sorry.
-
Mislav June 11th, 2008 @ 02:05 PM
- 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.
-
Mislav October 8th, 2008 @ 11:07 PM
- Milestone set to will_paginate v3.0 ("agnostic")
- Tag set to feature, will_paginate
-
Isla Maria March 8th, 2018 @ 12:15 PM
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
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.
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!