diff options
Diffstat (limited to 'config/routes/project.rb')
-rw-r--r-- | config/routes/project.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/config/routes/project.rb b/config/routes/project.rb index 0496bd85b4e..bcaa68c8ce5 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -40,7 +40,7 @@ constraints(ProjectUrlConstrainer.new) do # # Templates # - get '/templates/:template_type/:key' => 'templates#show', as: :template, constraints: { key: /[^\/]+/ } + get '/templates/:template_type/:key' => 'templates#show', as: :template, constraints: { key: %r{[^/]+} } resource :avatar, only: [:show, :destroy] resources :commit, only: [:show], constraints: { id: /\h{7,40}/ } do @@ -55,7 +55,7 @@ constraints(ProjectUrlConstrainer.new) do end resource :pages, only: [:show, :destroy] do - resources :domains, only: [:show, :new, :create, :destroy], controller: 'pages_domains', constraints: { id: /[^\/]+/ } + resources :domains, only: [:show, :new, :create, :destroy], controller: 'pages_domains', constraints: { id: %r{[^/]+} } end resources :snippets, concerns: :awardable, constraints: { id: /\d+/ } do @@ -65,7 +65,7 @@ constraints(ProjectUrlConstrainer.new) do end end - resources :services, constraints: { id: /[^\/]+/ }, only: [:index, :edit, :update] do + resources :services, constraints: { id: %r{[^/]+} }, only: [:index, :edit, :update] do member do put :test end @@ -346,7 +346,7 @@ constraints(ProjectUrlConstrainer.new) do end end - resources :project_members, except: [:show, :new, :edit], constraints: { id: /[a-zA-Z.\/0-9_\-#%+]+/ }, concerns: :access_requestable do + resources :project_members, except: [:show, :new, :edit], constraints: { id: %r{[a-zA-Z./0-9_\-#%+]+} }, concerns: :access_requestable do collection do delete :leave @@ -379,7 +379,7 @@ constraints(ProjectUrlConstrainer.new) do resources :uploads, only: [:create] do collection do - get ":secret/:filename", action: :show, as: :show, constraints: { filename: /[^\/]+/ } + get ":secret/:filename", action: :show, as: :show, constraints: { filename: %r{[^/]+} } end end |