From 8133fcd37a890466adde458fde426bb151656e1b Mon Sep 17 00:00:00 2001 From: jasder Date: Fri, 4 Jun 2021 11:33:21 +0800 Subject: [PATCH 1/2] =?UTF-8?q?FIX=20=E6=9B=B4=E6=94=B9=E6=8E=A8=E8=8D=90?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=8E=92=E5=BA=8F=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/projects_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 7612003f2..3e40619c5 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -177,7 +177,7 @@ class ProjectsController < ApplicationController end def recommend - @projects = Project.recommend.includes(:repository, :project_category, :owner).order(id: :desc) + @projects = Project.recommend.includes(:repository, :project_category, :owner).order(visits: :desc) end def about From 39acaa7f217079071c084f07d9d8da4e74ef3344 Mon Sep 17 00:00:00 2001 From: jasder Date: Tue, 8 Jun 2021 14:34:03 +0800 Subject: [PATCH 2/2] =?UTF-8?q?FIX=20=E8=A7=A3=E5=86=B3=E5=A4=B4=E6=AD=8C?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E6=97=A0=E6=B3=95=E8=AE=BF=E9=97=AE?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/repositories/detail.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/repositories/detail.json.jbuilder b/app/views/repositories/detail.json.jbuilder index 39f2563a4..3cf3858d6 100644 --- a/app/views/repositories/detail.json.jbuilder +++ b/app/views/repositories/detail.json.jbuilder @@ -48,7 +48,7 @@ if @result[:repo] json.size replace_bytes_to_b(number_to_human_size(@result[:repo]['size'].to_i*1024)) json.ssh_url @result[:repo]['ssh_url'] json.clone_url @result[:repo]['clone_url'] - json.default_branch @result[:repo]['default_branch'] + json.default_branch @project.educoder? ? "master" : @result[:repo]['default_branch'] json.empty @result[:repo]['empty'] json.full_name @result[:repo]['full_name'] json.private @result[:repo]['private']