# Paginate question

**URL:** <https://www.ruby-forum.com/t/paginate-question/119009>\
**Category:** Rails\
**Created:** [November 2, 2007, 3:51am UTC](https://www.ruby-forum.com/t/paginate-question/119009 "2007-11-02T03:51:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimmygoogle](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c67d28/32.png) [@jimmygoogle](https://www.ruby-forum.com/u/jimmygoogle)\
**Post date:** [November 2, 2007, 3:51am UTC](https://www.ruby-forum.com/t/paginate-question/119009/1 "2007-11-02T03:51:18Z")

</div>

I created my first app using scaffold. My question is it possible to  
paginate the show.rhtml so instead of paginating in the list view it  
does it in show.rhtml. I keep getting ?page=id appended to my urls.  
ex ([http://xxxxx/app/show/1?page=2](http://xxxxx/app/show/1?page=2))

this is what it looks like now

def show

@recipe = Recipe.find(params[:id])

conditions = [“title LIKE ?”, “%#{@params[:query]}%”] unless  
@params[:query].nil?

@total = Recipe.count(:conditions =\> conditions)

@recipe\_pages, @recipes = paginate :recipes, {  
:per\_page =\> 1,  
:conditions =\> conditions }

end

---

<div class="post-metadata">

**Author:** ![jimmygoogle](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c67d28/32.png) [@jimmygoogle](https://www.ruby-forum.com/u/jimmygoogle)\
**Post date:** [December 7, 2007, 9:10am UTC](https://www.ruby-forum.com/t/paginate-question/119009/2 "2007-12-07T09:10:25Z")

</div>

Hi guys

I have posted two days ago the same problem of jimmygoogle and I did not  
get any solution. I have searched the net and I did not find a solution.

I am not sure whether such problem is famous in rails and has a solution  
or there is no way to solve it.

any idea?

---

<div class="post-metadata">

**Author:** ![jimmygoogle](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c67d28/32.png) [@jimmygoogle](https://www.ruby-forum.com/u/jimmygoogle)\
**Post date:** [December 7, 2007, 12:44pm UTC](https://www.ruby-forum.com/t/paginate-question/119009/3 "2007-12-07T12:44:30Z")

</div>

I don’t understand why you need pagination in the show method. Usually  
we do the pagination in the index or search.

And w.r.t to the id problem. I also faced the same issue, but i don’t  
have the clue. If you pass :id=\>1 in the params it will work, but I  
don’t know why.
