diff --git a/app/controllers/watchers_controller.rb b/app/controllers/watchers_controller.rb index d9a8e898c..dceebee72 100644 --- a/app/controllers/watchers_controller.rb +++ b/app/controllers/watchers_controller.rb @@ -1,6 +1,6 @@ class WatchersController < ApplicationController before_action :require_login, except: %i[index] - before_action :set_project + before_action :find_project_with_id def index scope = @project.watchers.includes(:user) @@ -31,11 +31,4 @@ class WatchersController < ApplicationController end end - private - def set_project - @project = Project.find params[:project_id] - rescue Exception => e - tip_exception(e.message) - end - end