title: Convert SQL "Concat" to Activerecord
body: <p>I have a SQL query like this:</p>
  
  <pre><code>select * from clients where 'Ed Sheeran' like Concat(Concat('%',first_name),'%') 
  or 'Ed Sheeran' like Concat(Concat('%',last_name),'%')
  </code></pre>
  
  <p>I want to convert my query to active record. </p>
  
  <p>I'd attempted to convert it: </p>
  
  <pre><code>Client.joins(:cases).where(''Ed Sheeran' LIKE CONCAT(CONCAT('%'first_name, )'%')' OR 'Ed Sheeran' LIKE CONCAT(CONCAT('%'last_name, )'%')')
  </code></pre>
  
  <p>but I've got this result:</p>
  
  <pre><code>Incorrect parameter count in the call to native function 'CONCAT': SELECT COUNT(*) FROM `clients` INNER JOIN `cases` ON `cases`.`client_id` = `clients`.`id` AND `cases`.`deleted_at` IS NULL WHERE `clients`.`deleted_at` IS NULL AND ('%Ed Sheeran%' LIKE CONCAT(CONCAT()):
  </code></pre>