title: Help with a Join in Rails 3
body: <p>I have the following models:</p>
  
  <pre><code>class Event &lt; ActiveRecord::Base
    has_many :action_items
  end
  
  class ActionItem &lt; ActiveRecord::Base
    belongs_to :event
    belongs_to :action_item_type
  end
  
  class ActionItemType &lt; ActiveRecord::Base
    has_many :action_items
  end
  </code></pre>
  
  <p>And what I want to do is, for a given event, find all the action items that have an action item type with a name of "foo" (for example).  So I think the SQL would go something like this:</p>
  
  <pre><code>SELECT * FROM action_items a
  INNER JOIN action_item_types t
  ON a.action_item_type_id = t.id
  WHERE a.event_id = 1
  AND t.name = "foo"
  </code></pre>
  
  <p>Can anybody help me translate this into a nice active record query? (Rails 3 - Arel)</p>
  
  <p>Thanks!</p>