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-15 16:59:00 +0300
committerLin Jen-Shin <godfat@godfat.org>2018-10-26 09:27:05 +0300
commit1581f75fb511fed171e8105c1a0811561a2f2dcc (patch)
tree0bf87a3d3731017554446a3b02b7ba534f4d5395 /doc/development/ee_features.md
parent679c0048a8f679aad456c02e30486150bbd0d93d (diff)
Put EE routes in EE files under EE directories
Diffstat (limited to 'doc/development/ee_features.md')
-rw-r--r--doc/development/ee_features.md21
1 files changed, 15 insertions, 6 deletions
diff --git a/doc/development/ee_features.md b/doc/development/ee_features.md
index f9e6efa2c30..2415373f2d1 100644
--- a/doc/development/ee_features.md
+++ b/doc/development/ee_features.md
@@ -171,7 +171,7 @@ There are a few gotchas with it:
class Base
def execute
return unless enabled?
-
+
# ...
# ...
end
@@ -185,12 +185,12 @@ There are a few gotchas with it:
class Base
def execute
return unless enabled?
-
+
do_something
end
-
+
private
-
+
def do_something
# ...
# ...
@@ -204,14 +204,14 @@ There are a few gotchas with it:
```ruby
module EE::Base
extend ::Gitlab::Utils::Override
-
+
override :do_something
def do_something
# Follow the above pattern to call super and extend it
end
end
```
-
+
This would require updating CE first, or make sure this is back ported to CE.
When prepending, place them in the `ee/` specific sub-directory, and
@@ -332,6 +332,15 @@ full implementation details.
[ce-mr-full-private]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12373
[ee-mr-full-private]: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2199
+### Code in `config/routes`
+
+When we add `draw :admin` in `config/routes.rb`, the application will also
+load the file located in `config/routes/admin.rb`, and also
+`ee/config/routes/admin.rb` if the file exists.
+
+So if we want to extend a particular route file, just add the same file
+located in `ee/config/routes`.
+
### Code in `app/controllers/`
In controllers, the most common type of conflict is with `before_action` that