zambezi wrote:> Radio buttons in an edit/update form do not display the underlying
> data (all radio buttons are displayed unchecked) although any changes
> made through these contols are updated.
>
> <%= f.radio_button(:sex, ''female'',
:checked =>
> "unchecked") %>
> <%= f.radio_button(:sex, ''male'', :checked
=> "unchecked")
> %>
>
> In this case the column type is a string, however the same problem
> holds for boolean and integer column types. Anyway, I am missing
> something integal in the process, but clueless as to what it is.
Don''t set :checked -- let Rails determine state from the object.
>
> Feedback will be much appreciated.
>
> Thanks, Bill
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org
--
Posted via http://www.ruby-forum.com/.