增加发布问卷的路由
This commit is contained in:
parent
d448599664
commit
79ad33a90f
|
@ -90,7 +90,7 @@ class PollController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#添加单选题
|
#添加题目
|
||||||
def create_poll_question
|
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]
|
question_title = params[:poll_questions_title].nil? || params[:poll_questions_title].empty? ? l(:label_enter_single_title) : params[:poll_questions_title]
|
||||||
option = {
|
option = {
|
||||||
|
@ -117,7 +117,7 @@ class PollController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#修改单选题
|
#修改题目
|
||||||
def update_poll_question
|
def update_poll_question
|
||||||
@poll_question = PollQuestion.find params[:poll_question]
|
@poll_question = PollQuestion.find params[:poll_question]
|
||||||
#@poll = @poll_question.poll
|
#@poll = @poll_question.poll
|
||||||
|
@ -150,7 +150,7 @@ class PollController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#删除单选题
|
#删除题目
|
||||||
def delete_poll_question
|
def delete_poll_question
|
||||||
@poll_question = PollQuestion.find params[:poll_question]
|
@poll_question = PollQuestion.find params[:poll_question]
|
||||||
@poll = @poll_question.poll
|
@poll = @poll_question.poll
|
||||||
|
@ -166,6 +166,11 @@ class PollController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#发布问卷
|
||||||
|
def publish_poll
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
#提交答案
|
#提交答案
|
||||||
def commit_answer
|
def commit_answer
|
||||||
pq = PollQuestion.find(params[:poll_question_id])
|
pq = PollQuestion.find(params[:poll_question_id])
|
||||||
|
|
|
@ -64,6 +64,7 @@ RedmineApp::Application.routes.draw do
|
||||||
post 'commit_answer'
|
post 'commit_answer'
|
||||||
post 'create_poll_question'
|
post 'create_poll_question'
|
||||||
post 'commit_poll'
|
post 'commit_poll'
|
||||||
|
get 'publish_poll'
|
||||||
end
|
end
|
||||||
collection do
|
collection do
|
||||||
delete 'delete_poll_question'
|
delete 'delete_poll_question'
|
||||||
|
|
Loading…
Reference in New Issue