Check boxes and their values

I have a view which contains the following:

<%= check_box "property", "active",{}, "true", "false" %>

In the console I can do:

property = Property.find(:first)
property.active?

and this returns “true”, but in the view the box is never checked. I
know this must be simple, but I have no idea how to go about it. What
am I missing?

I created a very small rails app to test this out, and using the syntax
you used, the checkbox would get checked in the view when it should.

Please let me know if you want this app - I can email you a zip file of
it - it’s essentially static scaffolding over a book table with only two
columns, is_available, and name (a book admin), with a small change to
static scaffolding (in the scaffolding rails created a drop down list
with true and false for the boolean field.

Thanks!
Dominique

dominique
dot
plante
at
gmail
dot
com

Phil P. wrote:

I have a view which contains the following:

<%= check_box "property", "active",{}, "true", "false" %>

In the console I can do:

property = Property.find(:first)
property.active?

and this returns “true”, but in the view the box is never checked. I
know this must be simple, but I have no idea how to go about it. What
am I missing?