Sha256: 6f680d4a5f37290bb7dd07fe23b15e3e1dc7e4a7dffb58c88bfd293535a6a404
Contents?: true
Size: 521 Bytes
Versions: 5
Compression:
Stored size: 521 Bytes
Contents
require 'flipper/api/action' module Flipper module Api module V1 module Actions class BooleanGate < Api::Action route %r{api/v1/features/[^/]*/(enable|disable)/?\Z} def put feature_name = Rack::Utils.unescape(path_parts[-2]) feature = flipper[feature_name.to_sym] action = Rack::Utils.unescape(path_parts.last) feature.send(action) json_response({}, 204) end end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems