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”

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs