统计数
This commit is contained in:
parent
0c8dff30a8
commit
48f3338fbe
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue