title: Add record to a has_and_belongs_to_many relationship
body: <p>I have two models, users and promotions. The idea is that a promotion can have many users, and a user can have many promotions.</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
    has_and_belongs_to_many :promotions
  end
  
  class Promotion &lt; ActiveRecord::Base
    has_and_belongs_to_many :users
  end
  </code></pre>
  
  <p>I also have a promotions_users table/model, with no id of its own.  It references user_id and promotions_id</p>
  
  <pre><code>class PromotionsUsers &lt; ActiveRecord::Base
  end
  </code></pre>
  
  <p>So, how do I add a user to a promotion?  I've tried something like this:</p>
  
  <pre><code>user = User.find(params[:id])
  promotion = Promotion.find(params[:promo_id])
  promo = user.promotions.new(promo)
  </code></pre>
  
  <p>This results in the following error:</p>
  
  <pre><code>NoMethodError: undefined method `stringify_keys!' for #&lt;Promotion:0x10514d420&gt;
  </code></pre>
  
  <p>If I try this line instead:
  promo= user.promotions.new(promo.id)</p>
  
  <p>I get this error:</p>
  
  <pre><code>TypeError: can't dup Fixnum
  </code></pre>
  
  <p>I'm sure that there is a very easy solution to my problem, and I'm just not searching for the solution the right way.</p>