title: Rails 4 - checkboxes for has_and_belongs_to_many association
body: <p>I recently had a problem getting checkboxes to work for a has_and_belongs_to_many (HABTM) association in Rails 4. I was able to find the information on how to get it working correctly in a few disparate places, but thought it would be good to document the few simple steps necessary to get it working correctly in one place here on StackOverflow.</p>
  
  <p>As a setup assume a model of Kennel with a HABTM association to Handler.</p>
  
  <pre><code>class Kennel
      has_and_belongs_to_many :handlers
  end
  </code></pre>