From 65a3ddce41b921f5f3b0ec13867db4f451aad6d1 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 16 Jan 2015 15:05:30 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=A2=9E=E5=8A=A0=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=8D=95=E8=A1=8C=E6=96=87=E5=AD=97=E5=8A=9F=E8=83=BD=202?= =?UTF-8?q?=E3=80=81=E4=BF=AE=E6=94=B9=E9=A2=98=E7=9B=AE=E5=90=8E=E6=80=BB?= =?UTF-8?q?=E6=98=AF=E6=98=BE=E7=A4=BA=E4=B8=BA=E5=8D=95=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/poll_controller.rb | 3 +-- app/views/poll/_edit_single.html.erb | 14 +++++++---- app/views/poll/_new_single.html.erb | 29 ++++++++++++---------- app/views/poll/_show_single.html.erb | 14 ++++++++--- app/views/poll/update_poll_question.js.erb | 20 +++++++++++++-- 5 files changed, 55 insertions(+), 25 deletions(-) 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|%>