消息每种类型为空的时候给出提示

This commit is contained in:
huang 2015-08-28 15:51:42 +08:00
parent 9bc491227b
commit 5384e7eee8
2 changed files with 2 additions and 2 deletions

View File

@ -116,7 +116,7 @@ class UsersController < ApplicationController
user_querys.update_all(:viewed => true)
forum_querys.update_all(:viewed => true)
end
@new_message_count = forge_querys.count + forum_querys.count + course_querys.count + user_querys.count
# @new_message_count = forge_querys.count + forum_querys.count + course_querys.count + user_querys.count
case params[:type]
when nil
@message_alls = []

View File

@ -30,7 +30,7 @@
</ul>
</div>
<div>
<% if @new_message_count >0 %>
<% if @message_alls.count >0 %>
<%# 课程消息 %>
<% unless @message_alls.nil? %>
<% @message_alls.each do |ma| %>