increase a field value based on the radio button selection

Posted by sts on Stack Overflow See other posts from Stack Overflow or by sts
Published on 2009-07-30T10:18:09Z Indexed on 2010/03/25 13:03 UTC
Read the original article Hit count: 285

Filed under:
|

<% 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.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby