fix frontend ask_category error

This commit is contained in:
thomaschen 2013-09-11 16:46:56 +08:00 committed by chris
parent 71dad22b04
commit b7bf180df2
2 changed files with 6 additions and 7 deletions

View File

@ -27,12 +27,11 @@ class Panel::Ask::BackEnd::AskRepliesController < OrbitBackendController
if @ask_reply.send_email? if @ask_reply.send_email?
Resque.enqueue(SendAskReplyMail, @ask_reply.ask_question.id) Resque.enqueue(SendAskReplyMail, @ask_reply.ask_question.id)
end end
##
binding.pry
params[:school][:depts].each do |dns| params[:school][:depts].each do |dns|
send_request(dns, @ask_question, @ask_reply) send_request(dns, @ask_question, @ask_reply)
end unless params[:school].nil? end unless params[:school].nil?
##
redirect_to panel_ask_back_end_ask_questions_path, notice: t('ask.reply_success') redirect_to panel_ask_back_end_ask_questions_path, notice: t('ask.reply_success')
end end

View File

@ -35,7 +35,7 @@ $(document).ready(function(){
<div class="control-group"> <div class="control-group">
<%= f.label :ask_category_id, class: 'control-label required' %> <%= f.label :ask_category_id, class: 'control-label required' %>
<div class="controls"> <div class="controls">
<%= 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 %>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">