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:

http://gist.github.com/37276

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

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to