title: Rails HABTM with checkboxes
body: <p>I have three tables, accounts, campaigns and accounts_campaigns. I want to have checkboxes for select accounts in the campaigns edit form.</p>
  
  <p>I have Campaign's model like this:</p>
  
  <pre><code>class Campaign &lt; ActiveRecord::Base
    has_and_belongs_to_many :accounts
    accepts_nested_attributes_for :accounts
  end
  </code></pre>
  
  <p>I think i dont need to define the relationship on Account.</p>
  
  <p>And my form is:</p>
  
  <pre><code>= hidden_field_tag "campaign[accounts_ids][]", nil
    - Account.all.each do |account|
      %label.checkbox
        = check_box_tag "campaign[accounts_ids][]", account.id, @campaign.account_ids.include?(account.id),
        id: dom_id(account)
        = "#{account.name} - #{account.email}"
  </code></pre>
  
  <p>But i received this error:</p>
  
  <pre><code>unknown attribute: accounts_ids
  </code></pre>