how to do search with rails?

how to do search with rails?if i want search some thing in my database!

User.find(:all) - will return everything in the database
User.find_by_name("John") - will retun the first record with "John" in
the name col.
User.find_all_by_name("John") - will return an array with all the
records with the name "John"