summaryrefslogtreecommitdiff
path: root/app/controllers/projects/milestones_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/projects/milestones_controller.rb')
-rw-r--r--app/controllers/projects/milestones_controller.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/projects/milestones_controller.rb b/app/controllers/projects/milestones_controller.rb
index b9b3dcd5a85..e2c05171cd6 100644
--- a/app/controllers/projects/milestones_controller.rb
+++ b/app/controllers/projects/milestones_controller.rb
@@ -118,9 +118,11 @@ class Projects::MilestonesController < Projects::ApplicationController
end
end
+ # rubocop: disable CodeReuse/ActiveRecord
def milestone
@milestone ||= @project.milestones.find_by!(iid: params[:id])
end
+ # rubocop: enable CodeReuse/ActiveRecord
def authorize_admin_milestone!
return render_404 unless can?(current_user, :admin_milestone, @project)