title: Searching through array integer column with rails
body: <p>in my app I have table users that have the following column:</p>
  
  <pre><code>t.integer  "administrations", array: true
  </code></pre>
  
  <p>and I have code that looks like this:</p>
  
  <pre><code>User.where("administrations::int[] = ARRAY[#{administration_ids.join(',') }]::int[]")
  </code></pre>
  
  <p>but it is vulnerable for sql injection. I was trying to rewrite those to something like that:</p>
  
  <pre><code>User.where("administrations::int[] = ?", "ARRAY[#{administration_ids.join(',') }]::int[]")
  </code></pre>
  
  <p>but this not works...</p>
  
  <p>It returns:</p>
  
  <pre><code>PG::InvalidTextRepresentation: ERROR:  array value must start with "{" or dimension information
  </code></pre>