title: how to escape this properly in ActiveRecord in Rails 4.2 for use with intarray extension
body: <p>I am using the intarray and need:</p>
  
  <pre><code>WHERE (tag_ids @&gt; '{10001}') 
  </code></pre>
  
  <p>but using this:</p>
  
  <pre><code>   query_obj= query_obj.where("tag_ids @&gt; ?", mandatory_tag_id) 
  </code></pre>
  
  <p>outputs:</p>
  
  <pre><code>WHERE (tag_ids @&gt; '10001') 
  </code></pre>
  
  <p>How can I output it correctly with the brackets?</p>
  
  <h3>edit #1</h3>
  
  <pre><code>query_obj= query_obj.where("tag_ids @&gt; {?}", mandatory_tag_id) 
  </code></pre>
  
  <p>gives:</p>
  
  <pre><code>WHERE (tag_ids @&gt; {'10001'}) 
  </code></pre>
  
  <p>and</p>
  
  <pre><code>query_obj= query_obj.where("tag_ids @&gt; ?", "{#mandatory_tag_id}")
  </code></pre>
  
  <p>gives:</p>
  
  <pre><code>WHERE (tag_ids @&gt; '{#mandatory_tag_id}') 
  </code></pre>