增加发布问卷的路由

This commit is contained in:
sw 2015-01-16 15:57:49 +08:00
parent d448599664
commit 79ad33a90f
2 changed files with 9 additions and 3 deletions

View File

@ -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])

View File

@ -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'