summaryrefslogtreecommitdiff
path: root/app/controllers/ci
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-10-06 21:41:37 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-10-06 21:41:37 +0200
commit82b6a17ca70a20015e654b4a0fdb8aec6d244f95 (patch)
tree98b9229c66aa6605147ee9200635ce756bbd7562 /app/controllers/ci
parent27b75b2b2d9c274fca005949f645d97ce9333d71 (diff)
downloadgitlab-ce-82b6a17ca70a20015e654b4a0fdb8aec6d244f95.tar.gz
Fix ci build routing and few testsci-build-page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/controllers/ci')
-rw-r--r--app/controllers/ci/builds_controller.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/ci/builds_controller.rb b/app/controllers/ci/builds_controller.rb
index daf3bcf72a9..b0b8b62fced 100644
--- a/app/controllers/ci/builds_controller.rb
+++ b/app/controllers/ci/builds_controller.rb
@@ -17,7 +17,7 @@ module Ci
if params[:return_to]
redirect_to URI.parse(params[:return_to]).path
else
- redirect_to ci_project_build_path(project, build)
+ redirect_to build_path(build)
end
end
@@ -28,7 +28,7 @@ module Ci
def cancel
@build.cancel
- redirect_to ci_project_build_path(@project, @build)
+ redirect_to build_path(@build)
end
protected
@@ -44,5 +44,9 @@ module Ci
def commit_by_sha
@project.commits.find_by(sha: params[:id])
end
+
+ def build_path(build)
+ namespace_project_build_path(build.gl_project.namespace, build.gl_project, build)
+ end
end
end