diff --git a/app/controllers/homework_attach_controller.rb b/app/controllers/homework_attach_controller.rb index a143fe4aa..d601d32a1 100644 --- a/app/controllers/homework_attach_controller.rb +++ b/app/controllers/homework_attach_controller.rb @@ -112,7 +112,7 @@ class HomeworkAttachController < ApplicationController #获取作业的留言列表 def get_homework_jours - #@user = @bid.author + @user = @bid.author @jours = @bid.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC') @jour = paginateHelper @jours,10 @state = false diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb index c6a5d2819..8797474ec 100644 --- a/app/controllers/words_controller.rb +++ b/app/controllers/words_controller.rb @@ -82,7 +82,12 @@ class WordsController < ApplicationController def destroy @journal_destroyed = JournalsForMessage.delete_message(params[:object_id]) - + if @journal_destroyed.jour_type == "Bid" + @bid = Bid.find(@journal_destroyed.jour_id) + end + if @bid + @jours_count = @bid.journals_for_messages.where('m_parent_id IS NULL').count + end respond_to do |format| format.js #format.api { render_api_ok } diff --git a/app/views/homework_attach/_history.erb b/app/views/homework_attach/_history.erb index 299ba1aa5..c235e0867 100644 --- a/app/views/homework_attach/_history.erb +++ b/app/views/homework_attach/_history.erb @@ -26,7 +26,7 @@