diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-03-21 11:59:55 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-04-06 19:56:34 +0200 |
commit | ea69037831a9b607e7936cadb8078a3182d6635a (patch) | |
tree | 81608e3c5a96834e6da7ad37f7f9487070592444 /config/routes.rb | |
parent | 77e178b5e13633090307afa915eea50927fdabda (diff) | |
download | gitlab-ce-ea69037831a9b607e7936cadb8078a3182d6635a.tar.gz |
Improve routes for project badges
Diffstat (limited to 'config/routes.rb')
-rw-r--r-- | config/routes.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/config/routes.rb b/config/routes.rb index 6bf22fb4456..36561c31d48 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -749,10 +749,11 @@ Rails.application.routes.draw do end resources :runner_projects, only: [:create, :destroy] - resources :badges, only: [], path: 'badges/*ref', - constraints: { ref: Gitlab::Regex.git_reference_regex } do + resources :badges, only: [] do collection do - get :build, constraints: { format: /svg/ } + scope '*ref', constraints: { ref: Gitlab::Regex.git_reference_regex } do + get :build, constraints: { format: /svg/ } + end end end end |