This commit is contained in:
Bernie Chiu 2013-09-27 17:15:49 +08:00
parent 660960f316
commit 3eeda5410c
1 changed files with 2 additions and 1 deletions

View File

@ -13,6 +13,7 @@ class Panel::Ask::BackEnd::AskRepliesController < OrbitBackendController
def create
@ask_question = AskQuestion.find(params[:ask_question_id])
@ask_question.ask_reply = AskReply.new(params[:ask_reply])
@ask_reply = @ask_question.ask_reply
@ask_question.save
if @ask_question.ask_reply.send_email?
Resque.enqueue(SendAskReplyMail, @ask_reply.ask_question.id)
@ -44,7 +45,7 @@ class Panel::Ask::BackEnd::AskRepliesController < OrbitBackendController
elsif failed_count == 0 && success_count == 0 && @ask_reply.status == "轉介其他單位"
new_status = "轉介失敗"
end
@ask_reply.update_attributes(status: new_status)
redirect_to panel_ask_back_end_ask_questions_path, notice: t('ask.reply_success')