diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index 9c5f810c6..fc23166ff 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -119,8 +119,7 @@ class PollController < ApplicationController #修改单选题 def update_poll_question @poll_question = PollQuestion.find params[:poll_question] - @poll = @poll_question.poll - + #@poll = @poll_question.poll @poll_question.is_necessary = params[:is_necessary]=="true" ? 1 : 0 @poll_question.question_title = params[:poll_questions_title].nil? || params[:poll_questions_title].empty? ? l(:label_enter_single_title) : params[:poll_questions_title] ################处理选项 diff --git a/app/views/poll/_edit_single.html.erb b/app/views/poll/_edit_single.html.erb index 4e98babe4..b8157ee6c 100644 --- a/app/views/poll/_edit_single.html.erb +++ b/app/views/poll/_edit_single.html.erb @@ -1,13 +1,17 @@ +<%= form_for("",:url => update_poll_question_poll_index_path(:poll_question => poll_question.id),:remote => true) do |f|%>