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) 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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---