2016-07-28 20:54:08 -05:00
|
|
|
<%
|
|
|
|
question.input_options.each do | option |
|
|
|
|
option_id = "#{option.parameterize}_#{question.to_i}"
|
2016-07-30 16:25:09 -05:00
|
|
|
radio_html = {class: 'radio', id: option_id}
|
2016-07-28 20:54:08 -05:00
|
|
|
%>
|
|
|
|
<div class="form-group-multiples">
|
2016-07-30 16:25:09 -05:00
|
|
|
<%= radio_button_tag('answer[radio]', option, (question.answer == option), radio_html) %>
|
|
|
|
<%= label_tag(option_id, option) %>
|
2016-07-28 20:54:08 -05:00
|
|
|
</div>
|
|
|
|
<% end %>
|
2016-07-27 22:16:12 -05:00
|
|
|
|
2016-07-30 16:25:09 -05:00
|
|
|
<% if flash[:error].try(:include?, question.to_i) %>
|
|
|
|
<div class="error">Please select an answer.</div>
|
|
|
|
<% end %>
|