title: Finding ruby on rails records from 'has many through' join table, is there an easier way?
body: <p>I have a 'has many through' relationship between two Models:</p>
  
  <pre><code>Task:  
  has_many :placements
  has_many :games, :through =&gt; :placements
  
  Game:
    has_many :placements
    has_many :tasks, :through =&gt; :placements
  
  Placements:
    belongs_to :task
    belongs_to :game
  </code></pre>
  
  <p>In my controller's index method I want to list only those tasks that have a particular game id.
  The solution I came up with uses an array of id's, but I am thinking there must be an easier, however less obvious to me, way of doing this!</p>
  
  <p>@tasks = Task.find(Placement.where(:game_id => current_user.selectedgame).collect(&amp;:task_id))</p>
  
  <p>Any suggestions most welcome please.</p>