From b14d40f0b0b46aba95d15b139345674c6a3dbd09 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin <godfat@godfat.org> Date: Mon, 11 Jul 2016 18:40:45 +0800 Subject: [PATCH] Handle branches with / in the name --- config/routes.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/routes.rb b/config/routes.rb index 0a4b8609252..5c1460b0e75 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -735,7 +735,8 @@ Rails.application.routes.draw do resources :artifacts, only: [] do collection do - get :search, path: ':ref/:build_name(/*path)', format: false + get :search, path: ':ref/:build_name/*path', format: false, + constraints: { ref: %r{.+(?=/)} } # ref could have / end end -- GitLab