The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Officialized PaginationHelper

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Red Handed

Posts: 1158
Nickname: redhanded
Registered: Dec, 2004

Red Handed is a Ruby-focused group blog.
Officialized PaginationHelper Posted: Dec 28, 2004 1:50 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Red Handed.
Original Post: Officialized PaginationHelper
Feed Title: RedHanded
Feed URL: http://redhanded.hobix.com/index.xml
Feed Description: sneaking Ruby through the system
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Red Handed
Latest Posts From RedHanded

Advertisement

Regarding the story last week on the PaginationHelper for Rails, its author has updated the code and enhanced documentation. You can still paginate using the Paginator class directly or the helper can automatically paginate.

To automate pagination for all controllers:

 class PersonController < ApplicationController
   helper :pagination
   model :person

   paginate :people, :order_by => 'last_name, first_name',
            :per_page => 20
 end

To automate pagination for a single controller action:

 def list
   @person_pages, @people =
     paginate :people, :order_by => 'last_name, first_name'
 end

Sam Stephenson has really done a great job with this release, good of him to take the suggestions from the Paginator I offered last week and mix them up with the variety of other contributions offered by users of this fine Rails helper.

Anyway, it’s new home is here. Well done.

Read: Officialized PaginationHelper

Topic: Oh My God - P2P Previous Topic   Next Topic Topic: Vim, Ruby, and Family History

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use