From b1c70db28a83d9147bfabd3bcab148a2fd7ab7e8 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 23 May 2016 16:34:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E7=BA=BF=E6=9A=82=E6=97=B6=E8=BF=98?= =?UTF-8?q?=E5=8E=9F=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/news.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/news.rb b/app/models/news.rb index 7131969a4..877d799bf 100644 --- a/app/models/news.rb +++ b/app/models/news.rb @@ -169,7 +169,7 @@ class News < ActiveRecord::Base if self.course self.course.members.each do |m| if m.user_id != self.author_id - self.delay.send_message(m.user_id, self.course_id) + # self.delay.send_message(m.user_id, self.course_id) count = ShieldWechatMessage.where("container_type='User' and container_id=#{m.user_id} and shield_type='Course' and shield_id=#{self.course_id}").count if count == 0 ws = WechatService.new @@ -189,9 +189,9 @@ class News < ActiveRecord::Base end end - def send_message user_id, course_id - self.course_messages << CourseMessage.new(:user_id => user_id, :course_id => course_id, :viewed => false) - end + # def send_message user_id, course_id + # self.course_messages << CourseMessage.new(:user_id => user_id, :course_id => course_id, :viewed => false) + # end # Time 2015-03-31 13:50:54 # Author lizanle