I have a view like this,
<% count = 1 %>
<% for voting in @voting %>
<% if voting.question_id.eql?(count) %>
<%= radio_button( count, voting.vote_count, :radio_id => voting.nominees ) %>
<%= voting.nominees %>
<% end %>
<% if voting.nominees.eql?(radio_id) %>
<% voting.update_attribute('vote_count', voting.vote_count+1 ) %>
<% end %>
<% count += 1 %>
<% end %>
how can i compare the selected nominees with the existing one.
any help on this would be very useful...