diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-05-05 13:25:48 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-05-05 14:04:51 +0200 |
commit | 3264e09c6fbe07831db74b83d6a6620d9f8f47d9 (patch) | |
tree | 725c1a2973d1b93582dd3efa977485064ce38e55 | |
parent | 61dd92aaff822759941bb224de9f45bfc5f7cc9b (diff) | |
download | gitlab-ce-3264e09c6fbe07831db74b83d6a6620d9f8f47d9.tar.gz |
Require build to be present in the controller
-rw-r--r-- | app/controllers/projects/builds_controller.rb | 3 |
1 files changed, 1 insertions, 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 |