title: 3 table join in rails
body: <p>I am creating a game where users play different game and can choose their roles within each game(like team fortress).</p>
  
  <p>I have created a 2 table join "games_users"</p>
  
  <pre><code>create_table "games_users", :force =&gt; true do |t|
      t.integer  "game_id"
      t.integer  "user_id"
      t.datetime "created_at",  :null =&gt; false
      t.datetime "updated_at",  :null =&gt; false
    end
  </code></pre>
  
  <p>And managed to establish HABTM relationships between the games and users</p>
  
  <p>game.rb</p>
  
  <pre><code>has_and_belongs_to_many :users
  </code></pre>
  
  <p>user.rb</p>
  
  <pre><code>has_and_belongs_to_many :games
  </code></pre>
  
  <p>I would like to add now a roles model(or even a roles string) to the system with a 3 table join , how do I do this?</p>