Permalink
Browse files

Use clear for boolean gate.

  • Loading branch information...
1 parent 63e0644 commit ec7118157ff922f4899538795c70878669addf8c @jnunemaker committed Feb 20, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/flipper/feature.rb
View
@@ -59,7 +59,11 @@ def disable(thing = Types::Boolean.new(false))
gate = gate_for(thing)
payload[:gate_name] = gate.name
- adapter.disable self, gate, gate.wrap(thing)
+ if gate.is_a?(Gates::Boolean)
+ adapter.clear self
+ else
+ adapter.disable self, gate, gate.wrap(thing)
+ end
}
end

0 comments on commit ec71181

Please sign in to comment.