# Help with partials / pagination strategy

**URL:** <https://www.ruby-forum.com/t/help-with-partials-pagination-strategy/112387>\
**Category:** Rails\
**Created:** [August 18, 2007, 6:01am UTC](https://www.ruby-forum.com/t/help-with-partials-pagination-strategy/112387 "2007-08-18T06:01:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![charlie\_caroff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a587f6/32.png) [@charlie\_caroff](https://www.ruby-forum.com/u/charlie_caroff)\
**Post date:** [August 18, 2007, 6:01am UTC](https://www.ruby-forum.com/t/help-with-partials-pagination-strategy/112387/1 "2007-08-18T06:01:17Z")

</div>

Hi,

I have a few simple lists that I’m displaying all over my site, as  
paginated partials.

Sometimes a given list shows 5 items, sometimes 10, sometimes 20,  
depending on what page is being displayed. Sometimes a list is sorted  
by one criterion, sometimes by another.

So, being a newbie, I’ve ended up with many different actions to  
display and to paginate each partial. Lots and lots of actions.

What I’d really like is one pagination action, and one display action,  
per partial, or maybe just one action per partial. How is this done?  
It’s very cool how I can instantiate an object, in list context,  
inside an action, then pick up that object in a partial to display  
and / or paginate the partial, with just a few lines of code, but it  
might be far easier to just have one or two actions, with a bunch of  
settings for list size and sorting, to display each partial.

Any hints?

Charlie
