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 Peterman wrote:> I have a view which contains the following:
>
> <td> <%= 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?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---