title: ActiveRecord Arel OR condition
body: <p>How can you combine 2 different conditions using logical OR instead of AND?</p>
  
  <p><strong>NOTE:</strong> 2 conditions are generated as rails scopes and can't be easily changed into something like <code>where("x or y")</code> directly.</p>
  
  <p>Simple example:</p>
  
  <pre><code>admins = User.where(:kind =&gt; :admin)
  authors = User.where(:kind =&gt; :author)
  </code></pre>
  
  <p>It's easy to apply AND condition (which for this particular case is meaningless):</p>
  
  <pre><code>(admins.merge authors).to_sql
  #=&gt; select ... from ... where kind = 'admin' AND kind = 'author'
  </code></pre>
  
  <p>But how can you produce the following query having 2 different Arel relations already available?</p>
  
  <pre><code>#=&gt; select ... from ... where kind = 'admin' OR kind = 'author'
  </code></pre>
  
  <p>It seems (<a href="https://github.com/nkallen/arel" rel="noreferrer">according to Arel readme</a>):</p>
  
  <blockquote>
    <p>The OR operator is not yet supported</p>
  </blockquote>
  
  <p>But I hope it doesn't apply here and expect to write something like:</p>
  
  <pre><code>(admins.or authors).to_sql
  </code></pre>