title: Rails 3 Three Models Join
body: <p>I don't seem to get this right for some reason, though it sounds simple :/</p>
  
  <p>I have three models :</p>
  
  <pre><code>User(id,name,email)
  Skill(id,name,description)
  UserSkill(user_id,skill_id,level)
  </code></pre>
  
  <p>How can i get all skills of a certain user, whether he or she has discovered them or not ?</p>
  
  <p>For example, 3 skills (walk, talk, write). 3 users (John, Mary, Jack).</p>
  
  <p>If Mary walks and writes, how can i get it back as a result like :</p>
  
  <pre><code>Mary =&gt; {Skill: walk(includes UserSkill), Skill : talk, Skill : write(includes UserSkill) }
  </code></pre>
  
  <p>You get the idea :)</p>