Hi all, I can’t figure out why my radio_buttons won’t reflect the values
stored in my database. I read through some of the previous posts – is
it true that they don’t work with integers?
This is the code I’m using:
<% for question in @survey.questions %>
<%= debug question %>
<%= radio_button ( “question”, :question_id, question.option_one.id)
<%= question.option_one %>
<%= radio_button ( “question”, :question_id, question.option_two.id)
<%= question.option_two %>
<% end %>
The “debug question” statement prints out the correct values. I have to
think that I’m using the wrong parameters in the radio_button call, but
nothing I try is working.
I guess I could use the radio_button_tag builder but radio_button seems
better. Any help would be greatly appreciated!