Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2018-10-23 15:48:02 +0300
committerLin Jen-Shin <godfat@godfat.org>2018-10-26 09:27:05 +0300
commitd045df3da882fa8bcd0424df096cec0c61b1eaff (patch)
tree77f3328b73d4174f7d810f43ff036e6991c9a70b /doc/development/ee_features.md
parent52fa309e86d1bafc6b8a986d8bd74fd906b1ebc9 (diff)
Allow CE do nothing if route doesn't exist
Diffstat (limited to 'doc/development/ee_features.md')
-rw-r--r--doc/development/ee_features.md9
1 files changed, 5 insertions, 4 deletions
diff --git a/doc/development/ee_features.md b/doc/development/ee_features.md
index bad9909ed43..b6f053ff0e9 100644
--- a/doc/development/ee_features.md
+++ b/doc/development/ee_features.md
@@ -338,13 +338,14 @@ When we add `draw :admin` in `config/routes.rb`, the application will try to
load the file located in `config/routes/admin.rb`, and also try to load the
file located in `ee/config/routes/admin.rb`.
-It should at least load one file, at most two files. If it cannot find any
-files, an error will be raised.
+In EE, it should at least load one file, at most two files. If it cannot find
+any files, an error will be raised. In CE, since we don't know if there will
+be an EE route, it will not raise any errors even if it cannot find anything.
This means if we want to extend a particular CE route file, just add the same
file located in `ee/config/routes`. If we want to add an EE only route, we
-could still use `draw :ee_only` and add `ee/config/routes/ee_only.rb` without
-adding `config/routes/ee_only.rb`.
+could still put `draw :ee_only` in both CE and EE, and add
+`ee/config/routes/ee_only.rb` in EE, similar to `render_if_exists`.
### Code in `app/controllers/`