Commit c73e7b57 authored by James Lopez's avatar James Lopez

Merge branch 'al-feature-flags-doc' into 'master'

Add section about removing a feature flag to docs

See merge request gitlab-org/gitlab!49876
parents 18937395 4a2d600b
...@@ -378,6 +378,18 @@ You can also enable a feature flag for a given gate: ...@@ -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")) 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 ## Feature flags in tests
Introducing a feature flag into the codebase creates an additional code path that should be tested. Introducing a feature flag into the codebase creates an additional code path that should be tested.
......
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