Class: RolloutControl::FeaturesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- RolloutControl::FeaturesController
- Defined in:
- app/controllers/rollout_control/features_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
5 6 7 8 9 10 |
# File 'app/controllers/rollout_control/features_controller.rb', line 5 def index features = rollout.features.map do |feature| rollout.get(feature).to_hash.merge(name: feature) end render json: features.to_json end |
#show ⇒ Object
12 13 14 |
# File 'app/controllers/rollout_control/features_controller.rb', line 12 def show render json: rollout.get(feature).to_hash.merge(name: feature) end |
#update ⇒ Object
16 17 18 19 |
# File 'app/controllers/rollout_control/features_controller.rb', line 16 def update rollout.activate_percentage(feature, params[:percentage]) if params[:percentage] head 204 end |