Manual collection check boxes in Simple Form <p>I'm building a form using Simple Form where I must manually loop over a collection of records which are candidates for a HABTM relationship. I must do a manual loop because I need to render additional information about the records in a table, so I can't use Simple Form's <code>collection_check_boxes</code>.</p> <p>Models:</p> <pre><code>class Foo &lt; ActiveRecord::Base has_and_belongs_to_many :bars end class Bar &lt; ActiveRecord::Base has_and_belongs_to_many :foos end </code></pre> <p>View so far (HAML):</p> <pre><code>= f.simple_for_form @foo do |f| %table - @bars.each do |bar| %tr %td # Line of interest: = f.input :bar_ids, as: :boolean, label: bar.name %td = bar.additional_information </code></pre> <p>How do I tell Simple Form that <code>f.input :bar_ids</code> is part of an array so that it will name the field <code>foo[bar_ids][]</code> and assign a value of <code>bar.id</code>?</p>