gregbell/active_admin — Issue #742: Checkboxes for related model creates a blank item (and breaks update)
Author: Emprivo
Created: 2011-11-11 12:35:41+00:00
State: open

Here's how to recreate the bug:

If you have two models with a has_and_belongs_to_many relationship called ```Category``` and ```Store``` and in store.rb you have this:

```
form do |f|
f.inputs do
f.input :name
f.input :description
f.input :categories, :as => :check_boxes
end
f.buttons
end
```

The list of checkboxes that gets created for categories always has a blank hidden field at the top of the html. And obviously having this blank item for the array in the HTML form breaks the update!