summaryrefslogtreecommitdiff
path: root/config/routes.rb
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-03-21 11:59:55 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-04-06 19:56:34 +0200
commitea69037831a9b607e7936cadb8078a3182d6635a (patch)
tree81608e3c5a96834e6da7ad37f7f9487070592444 /config/routes.rb
parent77e178b5e13633090307afa915eea50927fdabda (diff)
downloadgitlab-ce-ea69037831a9b607e7936cadb8078a3182d6635a.tar.gz
Improve routes for project badges
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb7
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