修改首页项目显示为按活跃度排名的前10个项目
This commit is contained in:
parent
339b5b0296
commit
0dce86d47e
|
@ -158,10 +158,11 @@ module WelcomeHelper
|
|||
end
|
||||
|
||||
def find_miracle_project(sum, max_rate)
|
||||
max = sum*(max_rate.to_f/10)
|
||||
c1 = find_new_project(sum).to_a.dup
|
||||
c2 = find_all_hot_project(sum).to_a.dup
|
||||
(c2.take(sum-max)+c1.take(max)).take(sum)
|
||||
#max = sum*(max_rate.to_f/10)
|
||||
#c1 = find_new_project(sum).to_a.dup
|
||||
#c2 = find_all_hot_project(sum).to_a.dup
|
||||
#(c2.take(sum-max)+c1.take(max)).take(sum)
|
||||
find_all_hot_project(sum).to_a.dup
|
||||
end
|
||||
|
||||
def find_new_course limit=15
|
||||
|
|
Loading…
Reference in New Issue