On 23 November 2010 15:38, Blake Miller <[email protected]> wrote:
> I have a checkbox tag as follows:
> <%= f.check_box :receive_offers %>
>
> When I view source in the html, I see the value of the checkbox is "1",
> with the normal hidden field value of "0".  However, after posting the
> form and saving to the database, the Mysql column, which is a TinyInt,
> is ALWAYS 0.

First have a look in development.log where you will see the parameter
values posted and check that is what you expect.  Then if necessary
you can break into your controller code using ruby-debug and can
inspect the data to work out what is happening.  See the Rails Guide
on debugging if you are not familiar with this.

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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-talk?hl=en.

Reply via email to