Rails2.0 pagination

So how do I upgrade?

If you want to move your application to Rails 2.0, you should first move it to Rails 1.2.6. That’ll include deprecation warnings for most everything we yanked out in 2.0. So if your application runs fine on 1.2.6 with no deprecation warnings, there’s a good chance that it’ll run straight up on 2.0. Of course, if you’re using, say, pagination, you’ll need to install the classic_pagination plugin. If you’re using Oracle, you’ll need to install the activerecord-oracle-adapter gem. And so on and so forth for all the extractions.

pafination を使うためには、classic_pagination というプラグインを使わないといけないらしい。
それからoracle使うためにはactiverecord-oracle-adapterをインストールするんだってさ。


で、さっそくインストールしてみた。

>jruby script/plugin install classic_pagination
WARNING: unimplemented method called: Store#set_default_paths
+ ./CHANGELOG
+ ./README
+ ./Rakefile
+ ./init.rb
+ ./install.rb
+ ./lib/pagination.rb
+ ./lib/pagination_helper.rb
+ ./test/fixtures/companies.yml
+ ./test/fixtures/company.rb
+ ./test/fixtures/developer.rb
+ ./test/fixtures/developers.yml
+ ./test/fixtures/developers_projects.yml
+ ./test/fixtures/project.rb
+ ./test/fixtures/projects.yml
+ ./test/fixtures/replies.yml
+ ./test/fixtures/reply.rb
+ ./test/fixtures/schema.sql
+ ./test/fixtures/topic.rb
+ ./test/fixtures/topics.yml
+ ./test/helper.rb
+ ./test/pagination_helper_test.rb
+ ./test/pagination_test.rb


Pagination
==========

To install:

  script/plugin install svn://errtheblog.com/svn/plugins/classic_pagination

This code was extracted from Rails trunk after the release 1.2.3.
WARNING: this code is dead. It is unmaintained, untested and full of cruft.

There is a much better pagination plugin called will_paginate.
Install it like this and glance through the README:

  script/plugin install svn://errtheblog.com/svn/plugins/will_paginate

It doesn't have the same API, but is in fact much nicer. You can
have both plugins installed until you change your controller/view code that
handles pagination. Then, simply uninstall classic_pagination.

意訳:

このコードは死んでるし、メンテされないよ。will_paginateっていう
もっといいページネーションのプラグインがあるからインストールしてね。
(classic_paginationと)同じAPIじゃないけど、もっといい感じだよ。
両方インストールできるからコントローラとビューでページネーション
しているコードを変更するまで両方使ってちょ。
変更したらclassic_paginationをアンインストールしてくれ。

ってことで、will_paginateもインストールしましたとさ。