From d9dd744fb1f20781c23bb5e9aabe0993bfc275d8 Mon Sep 17 00:00:00 2001 From: yutao <283765470@qq.com> Date: Fri, 5 Jun 2015 10:16:16 +0800 Subject: [PATCH] ... --- app/controllers/messages_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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