Radio buttons not getting checked

I have the following code
<%= f.radio_button “inc_in_exp_sales”, “1” %>Yes
<%= f.radio_button “inc_in_exp_sales”, “0” %>No

works fine when adding a new record but when editing, the radio button
is not check based on the record in the Database

Any ideas

sorry, if this sounds a bit newbie like,
but your code should work, so the error must be
in the controller

did you check, the result is stored in the db as expected?

I did and it is stored in the db as 1 or 0, actually fixed that issue
by doing the following:

<%= f.radio_button “inc_in_exp_sales”, true %>Yes
<%= f.radio_button “inc_in_exp_sales”, false %>No

Now I have a new issue

I have a partial that is being outputted through a collection
statement. I wand to have a group of radio buttons but every time I
try to output the partial the radio button get all grouped together no
in separate groups

See #75 Complex Forms Part 3 - RailsCasts and the comments at the bottom.

Harlan Crystal Feb 21, 2008 at 10:03

Is there any strategy for using this technique with radio buttons? The
problem being that instead of having separate “button groups” for each
task, you end up with one huge button group for all the radio buttons
across tasks, because they all use the same “name” for radio widgets
in each task.

I am having the same issue

On Mar 14, 12:30 pm, Thorsten M. <rails-mailing-l…@andreas-