class Flipper::UI::Actions::BooleanGate

Public Instance Methods

post() click to toggle source
# File lib/flipper/ui/actions/boolean_gate.rb, line 12
def post
  render_read_only if read_only?

  feature = flipper[feature_name]
  @feature = Decorators::Feature.new(feature)

  if params['action'] == 'Enable'
    feature.enable
  else
    feature.disable
  end

  redirect_to "/features/#{@feature.key}"
end