Specify a checked_value and unchecked_value in your check_box method
call. Here's the method signature from the API docs
(api.rubyonrails.com):
check_box(object, method, options = {}, checked_value = "1",
unchecked_value = "0")
So you could replace the defaults of "1" and "0" with "t" and "f",
for example.
Regards,
David
On Dec 21, 2005, at 1:55 PM, Kevin Clark wrote:
I'm working on an application using sqlite locally and recently
noticed that checkboxes are evaluating to 1 and 0 (not true and false)
and thus aren't being sanitized to boolean values in the db ('t' and
'f' in sqlite). This isn't a problem in mysql because 1 and 0 are
synonymous to true and false, but there's issues for some.
Is this a bug? Is there some way around it that I've missed somewhere?
Kev
_______________________________________________
Rails-core mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-core
_______________________________________________
Rails-core mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-core