Hey Everyone:
I have been having some issues in certain projects with the extra
hidden_field that form.check_box automatically adds to check_box tags,
so I wrote a patch to allow people to exclude this extra tag. I was
looking for some feedback on this before I wrote up docs, etc.
Basically the "gotcha" mentioned in the rails docs doesn't have a
solution for:
"Unfortunately that workaround does not work when the check box goes
within an array-like parameter"
I altered the ActionView::Helpers::InstanceTag "to_check_box_tag"
method to look as follows:
So you could pass:
<%= f.check_box :public, {:ignore_hidden_field => true}%>
or if you don't want to ignore it, like most people won't, the default
will be to include it.
This is my first patch, etc. so be gentle.
Best,
Mike