diff options
author | Long Nguyen <long.polyglot@gmail.com> | 2016-05-02 16:37:12 +0700 |
---|---|---|
committer | Long Nguyen <long.polyglot@gmail.com> | 2016-05-02 16:37:12 +0700 |
commit | c0f02aad4a1a178109a235d34bd70218c0aec86c (patch) | |
tree | 0fda1649d7d67e1308ed0aaee241a638e4117119 /config | |
parent | df8fda60fbbd2b6b38bdcb1680a0f24598c29f79 (diff) | |
download | gitlab-ce-c0f02aad4a1a178109a235d34bd70218c0aec86c.tar.gz |
Add snippet tab under user profile
Diffstat (limited to 'config')
-rw-r--r-- | config/routes.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/config/routes.rb b/config/routes.rb index 2f820aafed1..f6a41331ecf 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -89,8 +89,6 @@ Rails.application.routes.draw do end end - get '/s/:username' => 'snippets#index', as: :user_snippets, constraints: { username: /.*/ } - # # Invites # @@ -355,6 +353,9 @@ Rails.application.routes.draw do get 'u/:username/contributed' => 'users#contributed', as: :user_contributed_projects, constraints: { username: /.*/ } + get 'u/:username/snippets' => 'users#snippets', as: :user_snippets, + constraints: { username: /.*/ } + get '/u/:username' => 'users#show', as: :user, constraints: { username: /[a-zA-Z.0-9_\-]+(?<!\.atom)/ } |