From e67831df77550b8bbf512f9c82e3e8c1f7f60e6e Mon Sep 17 00:00:00 2001 From: "sylor_huang@126.com" Date: Fri, 15 May 2020 17:31:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/projects_controller.rb | 4 ++-- config/routes.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 8734964f3..26e022052 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -2,7 +2,7 @@ class ProjectsController < ApplicationController include ApplicationHelper include OperateProjectAbilityAble before_action :require_login, except: %i[index branches group_type_list] - before_action :find_project_with_id, only: %i[show branches update destroy fork_users praise_users watch_user] + before_action :find_project_with_id, only: %i[show branches update destroy fork_users praise_users watch_users] before_action :authorizate_user_can_edit_project!, only: %i[update] before_action :project_public?, only: %i[fork_users praise_users watch_user] @@ -87,7 +87,7 @@ class ProjectsController < ApplicationController @watchers = paginate(watchers) end - def parise_users + def praise_users praises = @project.praise_treads.includes(:user).distinct @praises = paginate(praises) end diff --git a/config/routes.rb b/config/routes.rb index c658f0cc1..f7f21a065 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -105,7 +105,7 @@ Rails.application.routes.draw do get :branches post :watch get :watch_users - get :parise_users + get :praise_users get :fork_users end end