From 34a9ed5e85bad51b85ba1553221fbe7e8af6efc4 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 21 Mar 2005 14:35:36 +0000 Subject: Tweaked the documentation git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@967 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/helpers/pagination_helper.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_view/helpers') diff --git a/actionpack/lib/action_view/helpers/pagination_helper.rb b/actionpack/lib/action_view/helpers/pagination_helper.rb index cb3c3807eb..f34359583b 100644 --- a/actionpack/lib/action_view/helpers/pagination_helper.rb +++ b/actionpack/lib/action_view/helpers/pagination_helper.rb @@ -1,6 +1,14 @@ module ActionView module Helpers # Provides methods for linking to ActionController::Pagination objects. + # + # You can also build your links manually, like in this example: + # + # <%= link_to "Previous page", { :page => paginator.current.previous } if paginator.current.previous %> + # + # <%= link_to "Next page", { :page => paginator.current.next } of paginator.current.next =%> + # + # module PaginationHelper unless const_defined?(:DEFAULT_OPTIONS) DEFAULT_OPTIONS = { @@ -25,7 +33,7 @@ module ActionView # :link_to_current_page:: whether or not the current page # should be linked to (defaults to # +false+) - # :pararms:: any additional routing parameters + # :params:: any additional routing parameters # for page URLs def pagination_links(paginator, options={}) options.merge!(DEFAULT_OPTIONS) {|key, old, new| old} -- cgit v1.2.3