From: Devin Mullins Date: 2005-06-21T21:21:55+09:00 Subject: Re: Simple Check Box Question --------------030304000007080705040702 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Matt Koidin wrote: >I solved the problem -- > >I switched to using and mimic'd the the hidden >field that the check_box tag gives you. > > Mehh.... Evil... A look at the documentation says how to do it: http://api.rubyonrails.com/classes/ActionView/Helpers/FormHelper.html#M000344 *check_box*(object, method, options = {}, checked_value = "1", unchecked_value = "0") Returns a checkbox tag tailored for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). It's intended that method returns an integer and if that integer is above zero, then the checkbox is checked. Additional options on the input tag can be passed as a hash with options. The checked_value defaults to 1 while the default unchecked_value is set to 0 which is convenient for boolean values. Usually unchecked checkboxes don't post anything. We work around this problem by adding a hidden value with the same name as the checkbox. So your category_id seems to be in the wrong place. Devin --------------030304000007080705040702--