diff --git a/app/controllers/challenges_controller.rb b/app/controllers/challenges_controller.rb index fdaa30305..74352724c 100644 --- a/app/controllers/challenges_controller.rb +++ b/app/controllers/challenges_controller.rb @@ -155,6 +155,7 @@ class ChallengesController < ApplicationController @editable = @shixun.status == 0 # before_action:有判断权限,如果没发布,则肯定是管理人员 @user = current_user + @shixun.increment!(:visits) end def show