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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
42d2d64b
Commit
42d2d64b
authored
Aug 17, 2018
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mention how to override CE class methods
parent
c6f7f938
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
doc/development/ee_features.md
doc/development/ee_features.md
+28
-0
No files found.
doc/development/ee_features.md
View file @
42d2d64b
...
...
@@ -258,6 +258,31 @@ end
[
`extend ::Gitlab::Utils::Override`
]:
utilities.md#override
##### Overriding CE class methods
The same applies to class methods, except we want to use
`ActiveSupport::Concern`
and put
`extend ::Gitlab::Utils::Override`
within the block of
`class_methods`
. Here's an example:
```
ruby
module
EE
module
Groups
module
GroupMembersController
extend
ActiveSupport
::
Concern
class_methods
do
extend
::
Gitlab
::
Utils
::
Override
override
:admin_not_required_endpoints
def
admin_not_required_endpoints
super
.
concat
(
%i[update override]
)
end
end
end
end
end
```
#### Use self-descriptive wrapper methods
When it's not possible/logical to modify the implementation of a
...
...
@@ -665,6 +690,9 @@ module EE
extend
ActiveSupport
::
Concern
class_methods
do
extend
::
Gitlab
::
Utils
::
Override
override
:update_params_at_least_one_of
def
update_params_at_least_one_of
super
.
push
(
*
%i[
squash
...
...
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