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:
authorPhil Hughes <me@iamphill.com>2019-05-16 16:36:44 +0300
committerPhil Hughes <me@iamphill.com>2019-05-16 16:36:44 +0300
commit8214d031d3f6172094648a97bfb31642ba6efd08 (patch)
treed2612065c5274bff0be8b525ce1bc57ed78a65a9
parent166ac53c70e96e538703264dda169266fde6b030 (diff)
parent62152953f1b9ca55d031a6ed1e853d8c29eedbc5 (diff)
Merge branch 'docs-render_if_exists-relative-path' into 'master'
Explain `render_if_exists` relative path See merge request gitlab-org/gitlab-ce!28356
-rw-r--r--doc/development/ee_features.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/development/ee_features.md b/doc/development/ee_features.md
index 9853b38b8e9..8706fe537fa 100644
--- a/doc/development/ee_features.md
+++ b/doc/development/ee_features.md
@@ -446,6 +446,16 @@ The disadvantage of this:
port `render_if_exists` to CE.
- If we have typos in the partial name, it would be silently ignored.
+The `render_if_exists` view path argument must be relative to `app/views/` and `ee/app/views`.
+Resolving an EE template path that is relative to the CE view path will not work.
+
+```haml
+- # app/views/projects/index.html.haml
+
+= render_if_exists 'button' # Will not render `ee/app/views/projects/_button` and quietly fail
+= render_if_exists 'projects/button' # Will render `ee/app/views/projects/_button`
+```
+
#### Using `render_ce`
For `render` and `render_if_exists`, they search for the EE partial first,