title: How do I update a has_and_belongs_to_many collection RESTfully?
body: <p>I have two scaffold-generated Models, <b>student</b> and <b>class</b>.  They have a many-to-many relationship implemented with has_and_belongs_to_many.<br>
  I'd like to be able to change which <strong>class</strong>es a <strong>student</strong> is in as well as which <strong>student</strong>s are taking each <strong>class</strong>.  That is, I want to modify a <strong>student</strong>'s <em>classes</em> variable (adding and removing items from it) and vice versa.<br>
  How do I do this RESTfully?<br>
  If I'm removing a <strong>class</strong> from a <strong>student</strong>'s <em>classes</em> list, then it seems like I want to call <em>update</em> on my students_controller.  If this is the case, then what should I pass in as a parameter to modify the <em>classes</em> variable?  Another collection of <strong>class</strong>es (with the proper <strong>class</strong> removed)?<br>
  My other thought is just to call some action in the students_controller (say, remove_class) and pass in the ID of the <strong>class</strong> to be removed.  This seems sensical but not RESTful.</p>
  
  <p>What's the best way to do this?</p>