Hi all. I have a web app where by people submit data to the DB. I have a page that lists the last 5 submissions by the ID number. This allows a user to click one of the last 5 and it brings up all the data for that ID. e.g. /posts/121314 Id being 121314 for example. This all works fine. However I have a search page which is just a box which asks the user to either search the ID if known or company name by entering it in a form_for helper box. This bit I am having soo much trouble with. For example, ideally if a user enters the id number in the box, lets say it's 12345 it routes directly to /posts/12345 as this will show the data. Also I need that when they enter the company name it searches the db and then lists all entry id's that also have this name assigned to them. Once that bit is done I can continue with making them link to the pages etc... so i Have a search page within my posts controller as below and when they enter on the form more so for the company name it send it to the 'searchshow' page to lists the entries. Both these are currently empty. def search end def search show end any help or pointers in the write direction will be great. I have seen lots of info regarding search etc but they don't really cover my needs. I am new to ruby and rails really as you can tell. :) -- 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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/8f79b688285c0ade2ab594b01a2a00fb%40ruby-forum.com. For more options, visit https://groups.google.com/d/optout.