title: Can't update rails has_many :through relationship
body: <p>I try:</p>
  
  <pre><code>@item.associations.update_attributes(:tag_id=&gt;params[:tag])
  </code></pre>
  
  <p>and</p>
  
  <pre><code>@item.associations.tag_id=params[:tag]
  </code></pre>
  
  <p>Both give me undefined method errors for update_attributes and tag_id=, respectively. Here's my setup:</p>
  
  <pre><code>class Item &lt; ActiveRecord::Base
    has_many :associations,:foreign_key=&gt;"item_id",:dependent=&gt;:destroy
    has_many :reverse_associations,:foreign_key=&gt;"tag_id",:class_name=&gt;"Association"
    has_many :tags,:through=&gt;:associations
  end
  
  class Tag &lt; ActiveRecord::Base
    has_many :associations,:foreign_key=&gt;"tag_id",:dependent=&gt;:destroy
    has_many :reverse_associations,:foreign_key=&gt;"item_id",:class_name=&gt;"Association"
    has_many :items,:through=&gt;:associations
    attr_accessible :name
  end
  
  class Association &lt; ActiveRecord::Base
    belongs_to :item
    belongs_to :tag
  end
  </code></pre>
  
  <p>What am I doing wrong?</p>