diff --git a/app/controllers/memos_controller.rb b/app/controllers/memos_controller.rb index b85d30acf..3e5127897 100644 --- a/app/controllers/memos_controller.rb +++ b/app/controllers/memos_controller.rb @@ -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