AutoCommit Don Jul 30 01:03:05 CEST 2015

This commit is contained in:
Andreas Stephanides
2015-07-30 01:03:05 +02:00
parent 97df081b33
commit f161d15174
7 changed files with 31 additions and 4 deletions

View File

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

View File

@@ -1,2 +1,8 @@
<b><%= question.title%></b>
<%= form_for %>
<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 %>
<%= f.actions do %>
<%= f.action :submit, :as => :input %>
<% end %>
<% end %>
</div>

View File

@@ -16,6 +16,7 @@
</p>
<%= render @survey_question %>
<%= render partial: "answeredquestion", object: @survey_question %>
<%= link_to 'Edit', edit_survey_question_path(@survey_question) %> |
<%= link_to 'Back', survey_questions_path %>