diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-22 13:09:44 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-22 13:09:44 +0000 |
commit | daaa5251c9634ec18d720adc0e5daee8bc4d9a13 (patch) | |
tree | 0ab31b3d47c33dde9e4af9a714194a166777f10d /actionpack/README | |
parent | 6ad1b895f4a7a113ad372ce485ac20c762cc3c2c (diff) | |
download | rails-daaa5251c9634ec18d720adc0e5daee8bc4d9a13.tar.gz rails-daaa5251c9634ec18d720adc0e5daee8bc4d9a13.tar.bz2 rails-daaa5251c9634ec18d720adc0e5daee8bc4d9a13.zip |
Fixed documentation and prepared for 0.11.0 release
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@976 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/README')
-rwxr-xr-x | actionpack/README | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/actionpack/README b/actionpack/README index 7c7526a9e9..10992280ea 100755 --- a/actionpack/README +++ b/actionpack/README @@ -177,6 +177,21 @@ A short rundown of the major features: {Learn more}[link:classes/ActionView/Helpers/JavascriptHelper.html] +* Pagination for navigating lists of results. + + # controller + def list + @pages, @people = + paginate :people, :order_by => 'last_name, first_name' + end + + # view + <%= link_to "Previous page", { :page => @pages.current.previous } if @pages.current.previous %> + <%= link_to "Next page", { :page => @pages.current.next } of @pages.current.next =%> + + {Learn more}[link:classes/ActionController/Pagination.html] + + * Easy testing of both controller and template result through TestRequest/Response class LoginControllerTest < Test::Unit::TestCase |