From 3264e09c6fbe07831db74b83d6a6620d9f8f47d9 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Fri, 5 May 2017 13:25:48 +0200 Subject: Require build to be present in the controller --- app/controllers/projects/builds_controller.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/projects/builds_controller.rb b/app/controllers/projects/builds_controller.rb index d97bc93f8dc..0fd35bcb790 100644 --- a/app/controllers/projects/builds_controller.rb +++ b/app/controllers/projects/builds_controller.rb @@ -121,8 +121,7 @@ class Projects::BuildsController < Projects::ApplicationController end def build - @build ||= project.builds - .find_by!(id: params[:id]) + @build ||= project.builds.find(params[:id]) .present(current_user: current_user) end -- cgit v1.2.1