AutoCommit Fre Jul 31 12:03:05 CEST 2015

This commit is contained in:
Andreas Stephanides
2015-07-31 12:03:05 +02:00
parent 8a4a168fe4
commit e61142382e
3 changed files with 5 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
<div style="background:red"><b><%= answeredquestion.title%></b>
<div id="container_question_<%= answeredquestion.id %>" style="min-width: 310px; max-width: 800px; height: <%= (100+answeredquestion.choices.count * 50).to_s%>px; margin: 0 auto"> <div id="container_question_<%= answeredquestion.id %>" style="min-width: 310px; max-width: 800px; height: <%= (100+answeredquestion.choices.count * 50).to_s%>px; margin: 0 auto">
<div style="background:red"><b><%= answeredquestion.title%></b>
<ul> <ul>
<% answeredquestion.choices.each do |c| %> <% answeredquestion.choices.each do |c| %>
<li> <li>

View File

@@ -7,5 +7,7 @@
<li><%= render c %></li> <li><%= render c %></li>
<% end %> <% end %>
</ul> </ul>
<%= render partial: "answeredquestion", object: question if question.answers.where(user_id: current_user.id).count>0%>
</div> </div>
<% end %> <% end %>

View File

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