Hi, i was hoping someone could give me a little reffer to how i could do this in a cleaner way (i''m implementing a search task) => def search_task ... if params[:id]==306 @page_pages, @page = paginate(:pages, :conditions => [''a=? and b=? and c=? or d like ?'', var1, var2, var3, var4] ## :per_page...) else @page_pages, @page = paginate(:pages, :conditions => [''a=? and b=? or d like ?'', var1, var2, var4] ## :per_page...) end .. end i feel as if this is a complete waste of line-code, and was hoping there was some cleaner way to write this (not needing to copy the whole thing, becuase of one var excluded, or two, etc) many thanks! harp -- 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 -~----------~----~----~----~------~----~------~--~---