forked from bofh/fetsite
AutoCommit Don Jul 30 01:03:05 CEST 2015
This commit is contained in:
4
app/views/survey/questions/_answeredquestion.html.erb
Normal file
4
app/views/survey/questions/_answeredquestion.html.erb
Normal 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 %>
|
||||
@@ -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>
|
||||
|
||||
@@ -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 %>
|
||||
|
||||
Reference in New Issue
Block a user