From 870f9bba986751f0061216b01670ec5911a1c4e9 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 15 Jan 2015 16:50:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=85=E7=AD=94=E6=8C=89=E9=92=AE=E7=9A=84?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=AD=98=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/poll_controller.rb | 2 +- app/views/poll/_edit_MC.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index a63f9e8f6..2f8a26c2a 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -89,7 +89,7 @@ class PollController < ApplicationController def create_poll_question question_title = params[:poll_questions_title].nil? || params[:poll_questions_title].empty? ? l(:label_enter_single_title) : params[:poll_questions_title] option = { - :is_necessary => params[:is_necessary] || 1, + :is_necessary => (params[:is_necessary]=="true" ? 1 : 0), :question_title => question_title, :question_type => params[:question_type] || 1, :question_number => @poll.poll_questions.count + 1 diff --git a/app/views/poll/_edit_MC.html.erb b/app/views/poll/_edit_MC.html.erb index 9c34e1d51..6010132fb 100644 --- a/app/views/poll/_edit_MC.html.erb +++ b/app/views/poll/_edit_MC.html.erb @@ -6,7 +6,7 @@ - + />