summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-03-22 20:26:57 -0400
committerRobert Speicher <rspeicher@gmail.com>2016-03-22 20:26:57 -0400
commit19a2adfa0cd42d48600bb3036c6ff90d15bb41e6 (patch)
tree7dd7e32dd53ed160faa5596574a989bd3b3548b7 /config
parent57dd206f12524807403a6f3146bde0e31ead79a9 (diff)
downloadgitlab-ce-19a2adfa0cd42d48600bb3036c6ff90d15bb41e6.tar.gz
Add special cases for built-in Rails routes in development
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 90d858d7fc1..a4b99871744 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -16,6 +16,18 @@ Rails.application.routes.draw do
end
end
+ # Make the built-in Rails routes available in development, otherwise they'd
+ # get swallowed by the `namespace/project` route matcher below.
+ #
+ # See https://git.io/va79N
+ if Rails.env.development?
+ get '/rails/mailers' => 'rails/mailers#index'
+ get '/rails/mailers/:path' => 'rails/mailers#preview'
+ get '/rails/info/properties' => 'rails/info#properties'
+ get '/rails/info/routes' => 'rails/info#routes'
+ get '/rails/info' => 'rails/info#index'
+ end
+
namespace :ci do
# CI API
Ci::API::API.logger Rails.logger