AutoCommit Don Jul 30 14:03:07 CEST 2015

This commit is contained in:
Andreas Stephanides
2015-07-30 14:03:07 +02:00
parent 1e72b8e6ce
commit 2193fcc49e
3 changed files with 11 additions and 4 deletions

View File

@@ -1,4 +1,9 @@
<div style="background:red"><b><%= answeredquestion.title%></b>
<% answeredquestion.choices.each do |c| %>
<%= c.to_s %><%= answeredquestion.answers.where(choice_id: c.id).count %>n
<% end %>
<ul>
<% answeredquestion.choices.each do |c| %>
<li>
<%= c.to_s %><%= answeredquestion.answers.where(choice_id: c.id).count %>
</li>
<% end %>
</ul>
</div>

View File

@@ -1,7 +1,7 @@
<div style="background:red"><b><%= question.title%></b>
<%= semantic_form_for question, url: answer_survey_question_path do |f| %>
<%= f.input :selected, as: :check_boxes, collection: question.choices, label: false %>
<%= f.input :selected, as: :radio, collection: question.choices, label: false %>
<%= f.action :submit, :as => :input %>
<% end %>