title: In Arel, how can I combine a bunch of conditions with OR?
body: <p>I have a setup similar to this:</p>
  
  <pre><code>  table = self.arel_table
    nodes = [1,2,3].collect do |c|
      table[:foo].eq(c).and( table[:bar].eq(c) )
    end
  </code></pre>
  
  <p>I then want those condition fragments combined to end up with SQL similar to:</p>
  
  <pre><code>WHERE (foo = 1 AND bar = 1) OR (foo = 2 AND bar = 2) OR (foo = 3 AND bar = 3)
  </code></pre>
  
  <p>The closest I have so far is:</p>
  
  <pre><code>nodes.inject(nodes.shift) {|memo, node| memo.or( Arel::Nodes::Grouping.new(node) ) }
  </code></pre>
  
  <p>I've tried <code>Arel::Nodes::Grouping.new</code> in different ways but it never groups how I want.</p>