统计数

This commit is contained in:
huang 2016-12-30 22:20:29 +08:00
parent 0c8dff30a8
commit 48f3338fbe
1 changed files with 2 additions and 2 deletions

View File

@ -29,8 +29,8 @@ class MemosController < ApplicationController
def new
@memo = Memo.new
@my_forums_count = Forum.where(:creator_id => User.current.id).count
@my_memos_count = Memo.where(:author_id => User.current.id).count
@my_forums_count = Memo.where("author_id =? and parent_id is null", User.current.id).count
@my_memos_count = Memo.where("author_id =? and parent_id is not null", User.current.id).count
@forums = Forum.reorder("topic_count desc,updated_at desc")
respond_to do |format|
format.js