diff options
Diffstat (limited to 'config/routes/snippets.rb')
-rw-r--r-- | config/routes/snippets.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/config/routes/snippets.rb b/config/routes/snippets.rb new file mode 100644 index 00000000000..3ca096f31ba --- /dev/null +++ b/config/routes/snippets.rb @@ -0,0 +1,9 @@ +resources :snippets, concerns: :awardable do + member do + get 'raw' + get 'download' + end +end + +get '/s/:username', to: redirect('/u/%{username}/snippets'), + constraints: { username: /[a-zA-Z.0-9_\-]+(?<!\.atom)/ } |