2009/9/19 Kostas L. <loup...@gmail.com>: > > Hi guys! > I am using will_paginate in my rails application. > I want to merge these 2 lines in one: > > �...@cat_products1 = Product.find(:all, :conditions => {:category_id > => params[:id]}) > �...@cat_products2 = Product.paginate(:per_page => 5, :page => params > [:page], > :conditions => ['title like ?' , "%# > {params[:search]}%"], > :order => 'title') > > I want to paginate using the condition category_id=>params[:id] > > Any sollutions???
Can't you just include the category_id in the conditions for the paginate call? Or am I missing something? Colin --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---