From 79ad33a90f40ed65569d337c9c5f3fc876da12a6 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 16 Jan 2015 15:57:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8F=91=E5=B8=83=E9=97=AE?= =?UTF-8?q?=E5=8D=B7=E7=9A=84=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/poll_controller.rb | 11 ++++++++--- config/routes.rb | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index 28c44f0cb..2e7d95478 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -90,7 +90,7 @@ class PollController < ApplicationController end end - #添加单选题 + #添加题目 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 = { @@ -117,7 +117,7 @@ class PollController < ApplicationController end end - #修改单选题 + #修改题目 def update_poll_question @poll_question = PollQuestion.find params[:poll_question] #@poll = @poll_question.poll @@ -150,7 +150,7 @@ class PollController < ApplicationController end end - #删除单选题 + #删除题目 def delete_poll_question @poll_question = PollQuestion.find params[:poll_question] @poll = @poll_question.poll @@ -166,6 +166,11 @@ class PollController < ApplicationController end end + #发布问卷 + def publish_poll + + end + #提交答案 def commit_answer pq = PollQuestion.find(params[:poll_question_id]) diff --git a/config/routes.rb b/config/routes.rb index dc8205e2d..bd1b27dee 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -64,6 +64,7 @@ RedmineApp::Application.routes.draw do post 'commit_answer' post 'create_poll_question' post 'commit_poll' + get 'publish_poll' end collection do delete 'delete_poll_question'