title: Rails 4 LIKE query - ActiveRecord adds quotes
body: <p>I am trying to do a like query like so</p>
  
  <pre class="lang-ruby prettyprint-override"><code>def self.search(search, page = 1 )
    paginate :per_page =&gt; 5, :page =&gt; page,
      :conditions =&gt; ["name LIKE '%?%' OR postal_code like '%?%'", search, search],   order =&gt; 'name'
  end
  </code></pre>
  
  <p>But when it is run something is adding quotes which causes the sql statement to come out like so</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT COUNT(*)
  FROM "schools" 
  WHERE (name LIKE '%'havard'%' OR postal_code like '%'havard'%')):
  </code></pre>
  
  <p>So you can see my problem.
  I am using Rails 4 and Postgres 9 both of which I have never used so not sure if its and an activerecord thing or possibly a postgres thing.</p>
  
  <p>How can I set this up so I have like <code>'%my_search%'</code> in the end query?</p>