diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb index 680a13963..3d6772ea8 100644 --- a/app/controllers/words_controller.rb +++ b/app/controllers/words_controller.rb @@ -81,9 +81,10 @@ class WordsController < ApplicationController @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 + elsif @journal_destroyed.jour_type == "Course" + @course = Course.find @journal_destroyed.jour_id + @jours_count = @course.journals_for_messages.where('m_parent_id IS NULL').count end respond_to do |format| format.js diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index 6993b6554..2a26ff59f 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -137,7 +137,7 @@