title: how to modify complex find_by_sql query w/ union into rails 3
body: <p>here's the current query:</p>
  
  <pre><code>@feed = RatedActivity.find_by_sql(["(select *, null as queue_id, 3 as model_table_type from rated_activities where user_id in (?)) " +  
  "UNION (select *, null as queue_id, null as rating, 2 as model_table_type from watched_activities where user_id in (?)) " +  
  "UNION (select *, null as rating, 1 as model_table_type from queued_activities where user_id in (?)) " +"ORDER BY activity_datetime DESC limit 100", friend_ids, friend_ids, friend_ids])
  </code></pre>
  
  <p>Now, this is a bit of kludge, since there are actually models set up for:</p>
  
  <pre><code>class RatedActivity &lt; ActiveRecord::Base
    belongs_to :user
    belongs_to :media
  end
  
  class QueuedActivity &lt; ActiveRecord::Base
    belongs_to :user
    belongs_to :media
  end
  
  class WatchedActivity &lt; ActiveRecord::Base
    belongs_to :user
    belongs_to :media
  end
  </code></pre>
  
  <p>would love to know how to use activerecord in rails 3.0 to achieve basically the same thing as is done with the crazy union i have there.</p>