increase a field value based on the radio button selection
- by sts
<% count = 1 %
<% for question in @questions %
<%=count%. <%= question.title if question.title%
<% for response in @response %
<% if response.question_id.eql?(question.id) %
<%=radio_button(count, :voting, :count_modification) % <%= response.nomination %
<% end %
<% end %
<% count += 1 %
<% end %
This is my whole code to implment the survey in views. if i give the count as third argument in radio button i cant select answer for each question. i can select only one answer for the whole survey.