%
question.input_options.each do | option |
option_id = "#{option.parameterize}_#{question.to_i}"
radio_html = {class: 'radio', id: option_id}
%>
<%= radio_button_tag('answer[radio]', option, (question.answer == option), radio_html) %>
<%= label_tag(option_id, option) %>
<% end %>
<% if flash[:error].try(:include?, question.to_i) %>
Please select an answer.
<% end %>