title: Ruby on Rails: Has and belongs to many relationship: how do I destroy a relationship?
body: <p>This is a lot harder in code, than in real life. =)<br>
  But anyway,<br>
  My Users have managers, and vice versa...</p>
  
  <p>How do I remove the relationship?</p>
  
  <pre><code>@selected_user = User.find(params[:id])
  @selected_user.managers.delete_if{|x| x.standard_user_id == params[:id].to_i}
  </code></pre>
  
  <p>This is a self referential has and belongs to many relationship, so I have another table that has only two columns of foreign keys, both pointing to the Users table.  This lookup table does not have a model.</p>