summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-03-23 18:33:48 +0000
committerDouwe Maan <douwe@gitlab.com>2016-03-23 18:33:48 +0000
commit30246f1dc25125d712aab33032f5e14713f40594 (patch)
tree2c473f4c5252791b07d358c46a0ccc9ba0f733d7 /config
parent33b1bbba67a097ab90192cb0112284919fc3c8be (diff)
parent19a2adfa0cd42d48600bb3036c6ff90d15bb41e6 (diff)
downloadgitlab-ce-30246f1dc25125d712aab33032f5e14713f40594.tar.gz
Merge branch 'rs-rails-routes' into 'master'
Add special cases for built-in Rails routes in development See merge request !3369
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 4a3c23b7c1c..6bf22fb4456 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