Commit 12d7d9fd authored by Douwe Maan's avatar Douwe Maan

Merge branch 'tc-add-ee-feature-docs' into 'master'

Extend documentation on writing EE features

See merge request !2248
parents 41964f02 61a229e8
This diff is collapsed.
......@@ -2,6 +2,10 @@
This guide contains best-practices for avoiding conflicts between CE and EE.
## Implementing EE feature
Follow the [guidelines](ee_features.md) on how to implement a EE feature.
## Daily CE Upstream merge
GitLab Community Edition is merged daily into the Enterprise Edition (look for
......@@ -78,14 +82,12 @@ Separate CE and EE actions/keywords. For instance for `params.require` in
```ruby
def project_params
params.require(:project).permit(project_params_ce)
# On EE, this is always:
# params.require(:project).permit(project_params_ce << project_params_ee)
params.require(:project).permit(project_params_attributes)
end
# Always returns an array of symbols, created however best fits the use case.
# It _should_ be sorted alphabetically.
def project_params_ce
def project_params_attributes
%i[
description
name
......@@ -93,8 +95,16 @@ def project_params_ce
]
end
# (On EE)
def project_params_ee
```
In the `EE::ProjectsController` module:
```ruby
def project_params_attributes
super + project_params_attributes_ee
end
def project_params_attributes_ee
%i[
approvals_before_merge
approver_group_ids
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment