# Paginate - does it requires a specialized route?

**URL:** <https://www.ruby-forum.com/t/paginate-does-it-requires-a-specialized-route/99219>\
**Category:** Rails\
**Created:** [July 21, 2006, 2:44am UTC](https://www.ruby-forum.com/t/paginate-does-it-requires-a-specialized-route/99219 "2006-07-21T02:44:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![weyus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7ab992/32.png) [@weyus](https://www.ruby-forum.com/u/weyus)\
**Post date:** [July 21, 2006, 2:44am UTC](https://www.ruby-forum.com/t/paginate-does-it-requires-a-specialized-route/99219/1 "2006-07-21T02:44:59Z")

</div>

All,

I’m trying to take advantage of the pagination in my somewhat modified  
scaffold view now. But there’s something fundamental here that I’m  
missing.

I have this link\_to call:

\<%= link\_to ‘Previous page’, { :page =\>  
@target\_list\_pages.current.previous } if  
@target\_list\_pages.current.previous %\>

It generates this link:

\< a hre\_f="/list\_management/list?page=2"\>Next page\</ a\>

What I see is the underlined text for the link but in fact, it doesn’t  
render as a proper link.

Do I need to create a new route so that the page parameter can be passed  
into my “list” action?

If so, what is the format of that route supposed to be? I can’t use  
:controller/:action/:page because that would break my existing  
:controller/:action/:id route.

Or should my list action just be able to consume this “page” parameter,  
without any additional routes on my part?

Wes

---

<div class="post-metadata">

**Author:** ![weyus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7ab992/32.png) [@weyus](https://www.ruby-forum.com/u/weyus)\
**Post date:** [July 21, 2006, 3:07am UTC](https://www.ruby-forum.com/t/paginate-does-it-requires-a-specialized-route/99219/2 "2006-07-21T03:07:11Z")

</div>

Sorry - brain fart.
