From f7a6798b73eb46f25a4d638f51ffc4dc71cd79cc Mon Sep 17 00:00:00 2001 From: yanxd Date: Wed, 11 Dec 2013 16:15:10 +0800 Subject: [PATCH] . --- app/helpers/welcome_helper.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/helpers/welcome_helper.rb b/app/helpers/welcome_helper.rb index a182a01c9..1723dcc55 100644 --- a/app/helpers/welcome_helper.rb +++ b/app/helpers/welcome_helper.rb @@ -105,9 +105,10 @@ module WelcomeHelper searchStudent(project).count end def find_new_forum_topics limit=9 - activity = Redmine::Activity::Fetcher.new(nil) - activity.scope=['memos'] - activity.events_welcome(nil, nil, {:limit => limit}) + Memo.where('memos.parent_id IS NULL').reorder('ORDER BY memos.created_at DESC').limit(limit) + # activity = Redmine::Activity::Fetcher.new(nil) + # activity.scope=['memos'] + # activity.events_welcome(nil, nil, {:limit => limit}) end private