diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index c3cb3d8c9..b1da35cfc 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -99,7 +99,7 @@ class MessagesController < ApplicationController for teacher in teachers if(teacher.user_id != User.current.id) notify = ActivityNotify.new() - if(@board.course_id>0) + if(@board.course) notify.activity_container_id = @board.course_id notify.activity_container_type = 'Course' else @@ -188,7 +188,7 @@ class MessagesController < ApplicationController notifyto_arr.each do |k,user_id| if(user_id != User.current.id) notify = ActivityNotify.new() - if(@board.course_id>0) + if(@board.course) notify.activity_container_id = @board.course_id notify.activity_container_type = 'Course' else