From b7bf180df2b99fd0e7a6493f8666bb0212b8fc19 Mon Sep 17 00:00:00 2001 From: thomaschen <99703040@nccu.edu.tw> Date: Wed, 11 Sep 2013 16:46:56 +0800 Subject: [PATCH] fix frontend ask_category error --- .../panel/ask/back_end/ask_replies_controller.rb | 11 +++++------ .../panel/ask/front_end/ask_questions/index.html.erb | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/vendor/built_in_modules/ask_new/app/controllers/panel/ask/back_end/ask_replies_controller.rb b/vendor/built_in_modules/ask_new/app/controllers/panel/ask/back_end/ask_replies_controller.rb index 55aee182d..ce233ea72 100644 --- a/vendor/built_in_modules/ask_new/app/controllers/panel/ask/back_end/ask_replies_controller.rb +++ b/vendor/built_in_modules/ask_new/app/controllers/panel/ask/back_end/ask_replies_controller.rb @@ -27,12 +27,11 @@ class Panel::Ask::BackEnd::AskRepliesController < OrbitBackendController if @ask_reply.send_email? Resque.enqueue(SendAskReplyMail, @ask_reply.ask_question.id) end - ## - binding.pry - params[:school][:depts].each do |dns| - send_request(dns, @ask_question, @ask_reply) - end unless params[:school].nil? - ## + + params[:school][:depts].each do |dns| + send_request(dns, @ask_question, @ask_reply) + end unless params[:school].nil? + redirect_to panel_ask_back_end_ask_questions_path, notice: t('ask.reply_success') end diff --git a/vendor/built_in_modules/ask_new/app/views/panel/ask/front_end/ask_questions/index.html.erb b/vendor/built_in_modules/ask_new/app/views/panel/ask/front_end/ask_questions/index.html.erb index e38c86be6..b0a8da59e 100644 --- a/vendor/built_in_modules/ask_new/app/views/panel/ask/front_end/ask_questions/index.html.erb +++ b/vendor/built_in_modules/ask_new/app/views/panel/ask/front_end/ask_questions/index.html.erb @@ -35,7 +35,7 @@ $(document).ready(function(){
<%= f.label :ask_category_id, class: 'control-label required' %>
- <%= f.collection_select :ask_category_id, AskCategory.all, :id, :name %> + <%= f.collection_select :ask_category_id, AskCategory.all.select { |c| c.key != 'transfered_question' }, :id, :name %>