# Pagination and custom parameters

**URL:** <https://www.ruby-forum.com/t/pagination-and-custom-parameters/121890>\
**Category:** Rails\
**Created:** [December 2, 2007, 12:48pm UTC](https://www.ruby-forum.com/t/pagination-and-custom-parameters/121890 "2007-12-02T12:48:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![raimon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/59ef9b/32.png) [@raimon](https://www.ruby-forum.com/u/raimon)\
**Post date:** [December 2, 2007, 12:48pm UTC](https://www.ruby-forum.com/t/pagination-and-custom-parameters/121890/1 "2007-12-02T12:48:08Z")

</div>

hello again,

I have in a controller this:

@invoice\_pages, @invoices = paginate (:invoices,  
:conditions =\>  
[‘enterprise\_id = ? AND tipus = ?’, session[:user\_enterprise\_id] ,  
params[:kind]],  
:order =\> ‘data  
ASC’,  
:per\_page =\> 10 )

in the \_list.rhtml, I use this:

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

but, the resulted links doesn’t have the extra parameter that I need:  
params[:kind]]

this parameter cames from a first init link, and I want to propagate for  
all the links of the resulted pagination. as I’m only receiving this  
parameter once, why the pagination class can’t remember or store it in  
some place, like the :conditions ?

thanks !

regards,

raimon
