Require build to be present in the controller

This commit is contained in:
Grzegorz Bizon 2017-05-05 13:25:48 +02:00
parent 61dd92aaff
commit 3264e09c6f

View file

@ -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