Class: Flipper::Api::V1::Actions::GroupsGate
- Includes:
- FeatureNameFromRoute
- Defined in:
- lib/flipper/api/v1/actions/groups_gate.rb
Constant Summary
Constants inherited from Action
Action::VALID_REQUEST_METHOD_NAMES
Instance Attribute Summary
Attributes inherited from Action
Instance Method Summary collapse
Methods inherited from Action
#halt, #header, #initialize, #json_error_response, #json_response, route, route_match?, route_regex, #run, run, #run_other_action, #status
Constructor Details
This class inherits a constructor from Flipper::Api::Action
Instance Method Details
#delete ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/flipper/api/v1/actions/groups_gate.rb', line 21 def delete ensure_valid_params feature = flipper[feature_name] feature.disable_group(group_name) decorated_feature = Decorators::Feature.new(feature) json_response(decorated_feature.as_json, 200) end |
#post ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/flipper/api/v1/actions/groups_gate.rb', line 13 def post ensure_valid_params feature = flipper[feature_name] feature.enable_group(group_name) decorated_feature = Decorators::Feature.new(feature) json_response(decorated_feature.as_json, 200) end |