From daaa5251c9634ec18d720adc0e5daee8bc4d9a13 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 22 Mar 2005 13:09:44 +0000 Subject: 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 --- actionpack/README | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'actionpack/README') 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 -- cgit v1.2.3