title: Search multiple db columns in Rails 3.0
body: <p>I'm trying to write a statement that searches 2 db columns and returns results. Can this be done easily without the use of a gem like Searchlogic?</p>
  
  <pre><code>def self.search(search)
    if search
      find(:all, :conditions =&gt; ['city LIKE ?', "%#{search}%"])
    else
      find(:all)
    end
  end
  </code></pre>
  
  <p>What I have so far is a statement that performs a search on the city field of my database. However, I'd like to include functionality to cover the case of someone searching by state.</p>
  
  <p>So if someone types 'CA' the search will return every listing in California. If the user types 'Los Angeles' the listing in Los Angeles will be returned. So in short, I'd like to query 2 db fields at the same time and return appropriate results. Can this be done with a simple statement?</p>