From 579e78df9bf0ee89c8a9576216b584e1e4053369 Mon Sep 17 00:00:00 2001 From: yanxd Date: Thu, 28 Nov 2013 09:34:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A8=E8=AE=BA=E5=8C=BA=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E6=9C=80=E5=A4=9A=E7=9A=84=E4=B8=BB=E9=A2=98=E5=B8=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/welcome_helper.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/helpers/welcome_helper.rb b/app/helpers/welcome_helper.rb index 9218e3908..0856a26ac 100644 --- a/app/helpers/welcome_helper.rb +++ b/app/helpers/welcome_helper.rb @@ -98,9 +98,10 @@ module WelcomeHelper end #取得论坛数据 - def find_hot_forum_topics - + def find_hot_forum_topics limit=10 + Memo.order('replies_count DESC').where('replies_count <> 0').limit(limit) end + def sort_project_by_hot_rails project_type limit = 10 project_type == 0 ? Project.find_by_sql("