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("