How to write some search functionality in ror

Hi all
i have only one model in my appliction that is user model(here the
user is patient)
i as an administrator can enter the patient details…so if i have to
retrieve the patient deatails with a specific column name in patient
table what will be the code in model, view and controller…any clues…
i am using ruby 1.8.7, rails 2.3.8 and database sqlite3 on my windows7