讨论区回复最多的主题帖

This commit is contained in:
yanxd 2013-11-28 09:34:51 +08:00
parent 6a97cb69a8
commit 579e78df9b
1 changed files with 3 additions and 2 deletions

View File

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