I have a table in MySQL:
id int not null auto_increment,
title varchar(100) not null,
description text not null,
image_url varchar(200),
state varchar(50) not null,
approved bool,
primary key(id)
I am using a check_box for the approved boolean attribute, which on MySQL is
actually just an alias for small int. The code for the checkbox in the view
is this:
<%= check_box(:item, :approved , {} , ''1'',
''0'') %></p>
This is working fine, however, my model is leaking into my view here by
inidicating that the checkbox should have a ''1'' for checked
and a ''0'' for
unchecked.
Any suggestions on a better way to do this?
New to rails and loving it,
Dave
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails