title: Merge results from two has_many into one ActiveRecord object
body: <p>I have a messaging system, where a MessageUser can send Messages to multiple MessageUsers. Hence, a MessageUser has these relations to Messages:</p>
  
  <pre><code>has_many :sent_messages, foreign_key: :from_user_id, class_name: 'Message'
  has_many :message_recipients, foreign_key: :to_user_id
  has_many :received_messages, class_name: 'Message', through: :message_recipients, source: :message
  </code></pre>
  
  <p>I would really like to have a <code>has_many :messages</code> that will allow a MessageUser to get a relation to all Messages, whether he/she is a sender or a receiver. I need to keep the result as an ActiveRecord object, so that I don't have to load it all into memory, and can delegate sorting, filtering and pagination to the database.</p>
  
  <p>Can this be done?</p>
  
  <p>(For reference, a MessageRecipient is just a class to keep this relation to recipients. It only has a message_id and a to_user_id.)</p>