title: How to do a LIKE query in Arel and Rails?
body: <p>I want to do something like:</p>
  
  <pre><code>SELECT * FROM USER WHERE NAME LIKE '%Smith%';
  </code></pre>
  
  <p>My attempt in Arel:</p>
  
  <pre><code># params[:query] = 'Smith'
  User.where("name like '%?%'", params[:query]).to_sql
  </code></pre>
  
  <p>However, this becomes:</p>
  
  <pre><code>SELECT * FROM USER WHERE NAME LIKE '%'Smith'%';
  </code></pre>
  
  <p>Arel wraps the query string 'Smith' correctly, but because this is a LIKE statement it doesnt work.</p>
  
  <p>How does one do a LIKE query in Arel?</p>
  
  <p>P.S. Bonus--I am actually trying to scan two fields on the table, both name and description, to see if there are any matches to the query. How would that work?</p>