添加统计数
This commit is contained in:
parent
192f16ba79
commit
b5682adcd3
|
@ -131,6 +131,7 @@ class UsersController < ApplicationController
|
||||||
@user_course_messages_count = @user_course_messages.count
|
@user_course_messages_count = @user_course_messages.count
|
||||||
when 'forge_news'
|
when 'forge_news'
|
||||||
@user_forge_messages = ForgeMessage.where("forge_message_type =? and user_id =?", "News", @user).order("created_at desc")
|
@user_forge_messages = ForgeMessage.where("forge_message_type =? and user_id =?", "News", @user).order("created_at desc")
|
||||||
|
@user_forge_messages_count = @user_forge_messages.count
|
||||||
when 'poll'
|
when 'poll'
|
||||||
@user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "Poll", @user).order("created_at desc")
|
@user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "Poll", @user).order("created_at desc")
|
||||||
@user_course_messages_count = @user_course_messages.count
|
@user_course_messages_count = @user_course_messages.count
|
||||||
|
|
|
@ -210,12 +210,13 @@ class JournalsForMessage < ActiveRecord::Base
|
||||||
else # 留言回复
|
else # 留言回复
|
||||||
# 添加留言回复人
|
# 添加留言回复人
|
||||||
# reply_to = User.find(self.reply_id)
|
# reply_to = User.find(self.reply_id)
|
||||||
if self.user_id != self.parent.user_id && self.user_id != self.reply_id # 如果回帖人不是用户自己
|
if self.user_id != self.parent.user_id && self.user_id != self.reply_id && self.user_id != self.jour_id# 如果回帖人不是用户自己
|
||||||
receivers << User.find(self.reply_id)
|
receivers << User.find(self.reply_id)
|
||||||
end
|
|
||||||
if self.user_id != self.parent.jour_id
|
|
||||||
receivers << self.parent.jour
|
receivers << self.parent.jour
|
||||||
end
|
end
|
||||||
|
# if self.user_id != self.parent.jour_id
|
||||||
|
# receivers << self.parent.jour
|
||||||
|
# end
|
||||||
end
|
end
|
||||||
if self.jour_type == 'Principal'
|
if self.jour_type == 'Principal'
|
||||||
if self.user_id != self.jour_id
|
if self.user_id != self.jour_id
|
||||||
|
|
Loading…
Reference in New Issue