title: Rails: Proper way for MySQL query to search multiple attributes
body: <p>I know very little about SQL. My app is running Rails 3.0.9. I have a search feature in my app which allows a user to search for photos, but right now the query only checks <code>photo.name</code>:</p>
  
  <pre><code>where("photos.name LIKE ?", "%#{search}%")
  </code></pre>
  
  <p>I would like it to ALSO check the <code>photo.description</code> for a match. I tried the following:</p>
  
  <pre><code>where("photos.name OR photo.description LIKE ?", "%#{search}%")
  </code></pre>
  
  <p>That seemed to actually work in development (I use SQLite in development), but once on Heroku, this code failed. What is the proper way to do this? Thanks.</p>