title: How to return a subset of multiple collections and its related model in Ruby on Rails?
body: <p>Working with Rails 3 here.</p>
  
  <p>I have a model named 'employee' that has many addresses and has many contacts as such:</p>
  
  <pre><code>class Employee &lt; ActiveRecord::Base
  has_many :addresses
  has_many :contacts
  </code></pre>
  
  <p>What I want to do is to be able to write a single query that returns a specific Employee along with all the addresses created after a specified date and with all contacts created after that same date.  If this is possible, how would I craft such a statement?</p>
  
  <p>I have scopes defined on the address and contact models as such:</p>
  
  <pre><code>scope :created_after, lambda { |date_time| where('created_at &gt;= ? or updated_at &gt;= ?', date_time, date_time}
  </code></pre>
  
  <p>... but I can't come up with a way to craft a SINGLE query returning the Employee and a filtered subset of each collection in one swoop.  Any ideas on how to do so efficiently would be appreciated.</p>
  
  <p>Thanks -wg</p>