From dedb70c56bafa3c9c00c98c41bc2f15edb4ceeb2 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 16 Jan 2015 14:03:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=A4=9A=E9=80=89=E3=80=81=E5=8D=95=E8=A1=8C=E6=96=87?= =?UTF-8?q?=E5=AD=97=E3=80=81=E5=A4=9A=E8=A1=8C=E6=96=87=E5=AD=97=E7=9A=84?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/poll/_poll_content.html.erb | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/app/views/poll/_poll_content.html.erb b/app/views/poll/_poll_content.html.erb index 6c2e61215..40c9a6181 100644 --- a/app/views/poll/_poll_content.html.erb +++ b/app/views/poll/_poll_content.html.erb @@ -1,10 +1,26 @@ <% poll.poll_questions.each do |poll_question|%>
- <%= render :partial => 'show_MC', :locals => {:poll_question => poll_question} %> + <% if poll_question.question_type == 1%> + <%= render :partial => 'show_MC', :locals => {:poll_question => poll_question} %> + <% elsif poll_question.question_type == 2%> + <%= render :partial => 'show_MCQ', :locals => {:poll_question => poll_question} %> + <% elsif poll_question.question_type == 3%> + <%= render :partial => 'show_single', :locals => {:poll_question => poll_question} %> + <% elsif poll_question.question_type == 4%> + <%= render :partial => 'show_mulit', :locals => {:poll_question => poll_question} %> + <% end%>
<% end %> \ No newline at end of file