summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-07-13 18:19:29 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-07-13 18:19:29 +0800
commitbb5f06718cd4fb344398a5fef19f3cf9b400de97 (patch)
tree8e8605908f5e92352829efb3bd2aea1616d560dc
parent3336828152767bf22f9c59d54c1c13f5e3d88132 (diff)
downloadgitlab-ce-bb5f06718cd4fb344398a5fef19f3cf9b400de97.tar.gz
Rename to ref_name so it's aligning with API
-rw-r--r--app/controllers/projects/artifacts_controller.rb4
-rw-r--r--config/routes.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/projects/artifacts_controller.rb b/app/controllers/projects/artifacts_controller.rb
index bf9d72ae90c..f1370efd64e 100644
--- a/app/controllers/projects/artifacts_controller.rb
+++ b/app/controllers/projects/artifacts_controller.rb
@@ -60,8 +60,8 @@ class Projects::ArtifactsController < Projects::ApplicationController
end
def build_from_ref
- if params[:ref]
- builds = project.builds_for(params[:build_name], params[:ref])
+ if params[:ref_name]
+ builds = project.builds_for(params[:build_name], params[:ref_name])
builds.success.latest.first
end
diff --git a/config/routes.rb b/config/routes.rb
index 32b00652bb3..203f679226e 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -735,8 +735,8 @@ Rails.application.routes.draw do
resources :artifacts, only: [] do
collection do
- get :search, path: ':ref/:build_name/*path', format: false,
- constraints: { ref: /.+/ } # ref could have /
+ get :search, path: ':ref_name/:build_name/*path', format: false,
+ constraints: { ref_name: /.+/ } # ref could have /
end
end