title: Combine two ActiveRecord::Relation with OR, not AND, returning a Relation and not an Array to be able to paginate later
body: <p><code>a</code> and <code>b</code> are ActiveRecord::Relation objects which return the same type of objects(Micropost objects in this case)</p>
  
  <pre><code>a.class
  =&gt; ActiveRecord::Relation
  b.class
  =&gt; ActiveRecord::Relation
  a.first
  =&gt; Micropost(...) 
  b.first
  =&gt; Micropost(...) #They both return the same type of objects
  c=a+b
  c.class
  =&gt; Array #This is not what i'm looking for
  c=a|b
  c.class
  =&gt; Array #Not what i'm looking for either
  c=(a or b)
  c.class
  =&gt; ActiveRecord::Relation #But it is just a, so it's wrong
  c==a
  =&gt; true
  a.merge(b)
  =&gt; []  #It merges with AND which in my case results in an empty array
  </code></pre>
  
  <p>Is there some way to "OR" both Relation objects and return another Relation object in Rails 3.2.11? Do I need to use some gem such as <code>squeel</code> to do it?</p>
  
  <p>If it can't be done: Why it can't be done? Can I paginate the array resulting from <code>a|b</code> without loading every record from the database?<br/>
  If it can be done: Could anyone please write an example of how to do it?<br/></p>
  
  <p>Thanks in advance.</p>
  
  <p>EDIT: I copied the wrong variables into the block of code, b was not an ActiveRecord::Relation, it was actually an array and that is why a.merge(b) returned [].
  My fault.</p>
  
  <p>TLDR: Question is wrong, and array can be paginated :)</p>