Hi folks,
In order to provide forward compatibility with Rails 3, we are making
some changes to the way our pagination works.
APIs that are specifically affected by this change:
* Donations GET /donations.xml
* Personas GET /personas.xml
The change has to do with the way that the pagination information is
returned by a GET query.
The old way returns pagination data like this:
<personas>
<current_page type="integer">2</current_page>
<per_page type="integer">50</per_page>
<total_entries type="integer">1266</total_entries>
...
</personas>
The new way will return the data like this:
<personas type="array" current_page="1" per_page="2"
total_entries="624">
...
</personas>
If you're running our fork of the [WillPaginate gem](https://
github.com/mysmallidea/will_paginate/) note that it will NO LONGER
WORK on the client side with the new pagination system.
## Upgrading
Be sure to remove any gem dependencies to our old fork of WillPaginate
### Rails 2
For Rails 2.x apps, simply require [the original WillPaginate gem]
(
https://github.com/mislav/will_paginate/), along with [PoxPaginate]
(
https://github.com/c42/pox_paginate)
config.gem 'will_paginate'
config.gem "pox_paginate", :version => '>= 0.1.0', :lib =>
"pox_paginate"
### Rails 2 with Bundler
gem 'will_paginate'
gem 'pox_paginate', '>= 0.1.0'
### Rails 3
For Rails 3, add the following to your Gemfile:
gem 'will_paginate', '~> 3.0.beta'
gem 'pox_paginate'
## When will these changes happen?
We will roll out these changes in two phases.
### Phase 1: Monday, December 13, 2010
We will revert to the default will_paginate gem, which removes all
pagination. If you're using our old WillPaginate fork, it should still
work, but the per_page, total_pages, and total_entries variables will
no longer be sent.
### Phase 2: Tuesday, December 14, 2010
We will deploy the PoxPaginate gem, which will restore pagination
options, as explained above.
This should give you time to deploy any needed changes to your apps.
I'm really sorry for any hassle this causes you - please send me your
feedback if this ruins your day. However, in the long run I think it
will be worthwhile as we work for full Rails 3 support.