Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
62152953
Commit
62152953
authored
May 16, 2019
by
Luke Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Explain `render_if_exists` relative path
parent
19e0a9a0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
doc/development/ee_features.md
doc/development/ee_features.md
+10
-0
No files found.
doc/development/ee_features.md
View file @
62152953
...
@@ -446,6 +446,16 @@ The disadvantage of this:
...
@@ -446,6 +446,16 @@ The disadvantage of this:
port
`render_if_exists`
to CE.
port
`render_if_exists`
to CE.
-
If we have typos in the partial name, it would be silently ignored.
-
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`
#### Using `render_ce`
For
`render`
and
`render_if_exists`
, they search for the EE partial first,
For
`render`
and
`render_if_exists`
, they search for the EE partial first,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment