title: rails - Finding intersections between multiple arrays
body: <p>I am trying to find the intersection values between multiple arrays.</p>
  
  <p>for example</p>
  
  <pre><code>code1 = [1,2,3]
  code2 = [2,3,4]
  code3 = [0,2,6]
  </code></pre>
  
  <p>So the result would be 2</p>
  
  <p>I know in PHP you can do this with array_intersect</p>
  
  <p>I wanted to be able to easily add additional array so I don't really want to use multiple loops</p>
  
  <p>Any ideas ?</p>
  
  <p>Thanks, Alex</p>