Created
July 29, 2019 08:27
-
-
Save itssomething/0adc5109c9d89bc690f2083dfab7c457 to your computer and use it in GitHub Desktop.
test temp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= @questions.each.with_index(1) do |q, index| %> | |
<div><strong><%= index %>.  <%= q.name %></strong></div> | |
<%#= question.answers.each do |answer| %> | |
<div><%#= answer.content %></div> | |
<%# end %> | |
<%= fields_for q do |ff| %> | |
<div class="answers-list"> | |
<% if q.is_multi? %> | |
<%= q.answers.each do |a| %> | |
<div> | |
<%= check_box_tag ("question[#{q.id}]").to_sym, a.id %> | |
<%= label_tag ("question[#{q.id}]").to_sym, a.content %> | |
</div> | |
<% end %> | |
<% else %> | |
<%= q.answers.each do |a| %> | |
<div> | |
<%= radio_button_tag ("question[#{q.id}]").to_sym, a.id %> | |
<%= label_tag ("question[#{q.id}]").to_sym, a.content %> | |
</div> | |
<% end %>> | |
<% end %> | |
</div> | |
<% end %> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment