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
4a2d600b
Commit
4a2d600b
authored
Dec 17, 2020
by
Amparo Luna
Committed by
James Lopez
Dec 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add section about removing a feature flag to docs
parent
2cb0a0b8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
doc/development/feature_flags/development.md
doc/development/feature_flags/development.md
+12
-0
No files found.
doc/development/feature_flags/development.md
View file @
4a2d600b
...
...
@@ -378,6 +378,18 @@ You can also enable a feature flag for a given gate:
Feature
.
enable
(
:feature_flag_name
,
Project
.
find_by_full_path
(
"root/my-project"
))
```
### Removing a feature flag locally (in development)
When manually enabling or disabling a feature flag from the Rails console, its default value gets overwritten.
This can cause confusion when changing the flag's
`default_enabled`
attribute.
To reset the feature flag to the default status, you can remove it in the rails console (
`rails c`
)
as follows:
```
ruby
Feature
.
remove
(
:feature_flag_name
)
```
## Feature flags in tests
Introducing a feature flag into the codebase creates an additional code path that should be tested.
...
...
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