diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index 48b1af43a..e94b0f132 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -114,7 +114,12 @@ class PollController < ApplicationController #修改单选题 def update_poll_question - a = 1 + @poll_question = PollQuestion.find params[:poll_question] + @poll = @poll_question.poll + + respond_to do |format| + format.js + end end #删除单选题 diff --git a/app/views/poll/_edit_MC.html.erb b/app/views/poll/_edit_MC.html.erb index 6010132fb..fa0e8d802 100644 --- a/app/views/poll/_edit_MC.html.erb +++ b/app/views/poll/_edit_MC.html.erb @@ -1,33 +1,31 @@ -<%= form_for poll_question,:url =>update_poll_question_poll_path(@poll.id),:remote => true do |f|%> -