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
3fa5e734
Commit
3fa5e734
authored
Nov 17, 2016
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix typos
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
25c9c8ce
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
doc/development/limit_ee_conflicts.md
doc/development/limit_ee_conflicts.md
+7
-8
No files found.
doc/development/limit_ee_conflicts.md
View file @
3fa5e734
...
@@ -50,10 +50,10 @@ Notes:
...
@@ -50,10 +50,10 @@ Notes:
#### List or arrays are augmented in EE
#### List or arrays are augmented in EE
In controllers, the most common type of conflict
s is either in a
`before_action`
In controllers, the most common type of conflict
is with
`before_action`
that
that
has a list of actions in CE but EE adds some actions to that list.
has a list of actions in CE but EE adds some actions to that list.
Same problems
often occurs for
`params.require`
/
`params.permit`
calls.
The same problem
often occurs for
`params.require`
/
`params.permit`
calls.
##### Mitigations
##### Mitigations
...
@@ -64,7 +64,7 @@ Separate CE and EE actions/keywords. For instance for `params.require` in
...
@@ -64,7 +64,7 @@ Separate CE and EE actions/keywords. For instance for `params.require` in
def
project_params
def
project_params
params
.
require
(
:project
).
permit
(
project_params_ce
)
params
.
require
(
:project
).
permit
(
project_params_ce
)
# On EE, this is always:
# On EE, this is always:
# params.require(:project).permit(project_params_ce
+
project_params_ee)
# params.require(:project).permit(project_params_ce
<<
project_params_ee)
end
end
# Always returns an array of symbols, created however best fits the use case.
# Always returns an array of symbols, created however best fits the use case.
...
@@ -138,9 +138,9 @@ at the same place in EE
...
@@ -138,9 +138,9 @@ at the same place in EE
Blocks of code that are EE-specific should be moved to partials as much as
Blocks of code that are EE-specific should be moved to partials as much as
possible to avoid conflicts with big chunks of HAML code that that are not fun
possible to avoid conflicts with big chunks of HAML code that that are not fun
to resolve when you add the indentation
in
the equation.
to resolve when you add the indentation
to
the equation.
For instance this kind of thing
s
:
For instance this kind of thing:
```
haml
```
haml
-
if
can?
(
current_user
,
:"admin_
#{
issuable
.
to_ability_name
}
"
,
issuable
.
project
)
-
if
can?
(
current_user
,
:"admin_
#{
issuable
.
to_ability_name
}
"
,
issuable
.
project
)
...
@@ -250,8 +250,7 @@ and then the `_weight_form.html.haml` could be as follows:
...
@@ -250,8 +250,7 @@ and then the `_weight_form.html.haml` could be as follows:
Note:
Note:
-
The safeguards at the top allows to get rid of an unneccessary indentation
-
The safeguards at the top allow to get rid of an unneccessary indentation level
level
-
Here we only moved the 'Weight' code to a partial since this is the only
-
Here we only moved the 'Weight' code to a partial since this is the only
EE-specific code in that view, so it's the most likely to conflict, but you
EE-specific code in that view, so it's the most likely to conflict, but you
are encouraged to use partials even for code that's in CE to logically split
are encouraged to use partials even for code that's in CE to logically split
...
...
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