From c67686bdf50f335addf1c222d72b03ae679178df Mon Sep 17 00:00:00 2001 From: jasder Date: Fri, 7 May 2021 11:10:03 +0800 Subject: [PATCH] FIX code review --- app/controllers/projects_controller.rb | 2 +- config/routes.rb | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index e6abf98a4..ed63ab1d1 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -167,7 +167,7 @@ class ProjectsController < ApplicationController end def recommend - @projects = Project.recommend.includes(:repository, :project_category, :owner).limit(5) + @projects = Project.recommend.includes(:repository, :project_category, :owner).order(id: :desc).limit(5) end def about diff --git a/config/routes.rb b/config/routes.rb index fa76ba467..2901e0f56 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -392,7 +392,6 @@ Rails.application.routes.draw do get :files get :detail get :archive - get :top_counts get :entries match :sub_entries, :via => [:get, :put] get :commits